如何完全禁用缓存? [英] How do I completely disable cache?
问题描述
Drupal 6的缓存可以设置为禁用,正常或侵略。我的Drupal 7安装找不到这些选项。只有一个按钮可以刷新所有的缓存,但是对于我对模块或模板所做的每一个改变,都必须单击它。更改我的意思是添加一些HTML标签到模块或模板。
Drupal 6's cache can be set to disabled, normal or aggressive. I cannot find these options for my Drupal 7 installation. There is only a button that flushes all the cache but it has to be clicked for every change I made to a module or a template. By change I mean adding some HTML tags to a module or a template.
感谢mirzu的回复,我已经安装了 devel module ,但它也不起作用。我唯一的方法是看到我的更改是通过禁用和启用该模块。
Thanks to mirzu's response, I already installed the devel module but it doesn't work either. The only way I get so see my changes is by disabling and enabling the module.
hello.module看起来像:
The hello.module looks like:
function annotate_menu() {
$items = array();
$items['hello'] = array(
'title' => t('Hello world'),
'page callback' => 'hello_output',
'access arguments' => array('access content'),
);
return $items;
}
function hello_output() {
header('Content-type: text/plain; charset=UTF-8');
header('Content-Disposition: inline');
return 'annotate';
}
模板页面-hello.tpl.php包含打印$ content;
。
The template page-hello.tpl.php contains print $content;
.
我通过 http:// localhost / test / hello
。
推荐答案
完全禁用缓存并使用 devel模块,并选中每个页面加载时重建缓存注册表框。
Completely disable the cache and use the devel module and check the box that reads "rebuild the cache registry on each page load."
这篇关于如何完全禁用缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!