关闭 Drupal 7 的缓存
有没有办法在开发新模块时以“非缓存”模式运行 Drupal 7?我的具体需求是在开发过程中关闭模块和/或模块信息的任何缓存,因此我在进行更改时不需要清除缓存,但通常在学习新系统时我更喜欢关闭其内部缓存,因为我还没有了解哪些更改需要清除缓存,哪些不需要(即“我做错了吗,还是旧结果只是缓存?”
此外,有没有一种方法可以快速清除 Drupal 缓存 )命令行(而不必使用性能部分中的应用程序 UI)
Is there a way to run Drupal 7 in a "non-cache" mode while developing new modules? My specific need is to turn off any caching of modules and/or module information during development so I don't need to clear the cache when I make my changes, but generally when learning a new system I prefer its internal cache be off since I haven't yet learned what changes require a cache clearing, and what don't (i.e. "Am I doing this wrong, or are the old results just cached?"
Also, is there a way to quickly clear out the Drupal cache from the command line (instead of having to use the application UI in the performance section)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
安装 Drush 并在命令行上运行
drush cc all
。和/或安装管理菜单并将鼠标悬停在左上角的 Drupal 图标上,然后单击“刷新所有缓存”。
最后,您可以安装 Devel 模块并选中“在每次页面加载时重建缓存注册表”框。
Install Drush and run
drush cc all
on the command line.And/or install Admin Menu and hover over the Drupal icon in the top left corner, then on "Flush all caches".
And finally you could install the Devel module and check the box that reads "rebuild the cache registry on each page load."
请参阅http://drupal.org/node/797346。
顺便说一句,前段时间已经在 如何完全禁用缓存?
See http://drupal.org/node/797346.
Btw, already answered this some time ago at How do I completely disable cache?