我正在尝试使用 Zend_Cache 缓存布局脚本和控制器的操作脚本输出的所有内容,但它无法正常工作。我得到的只是
DEBUG HEADER:这是一个缓存页面!
我得到了 layout.phtml 脚本和 index.phtml 脚本。两者都产生html代码。在我的 IndexController 我放
$frontendOptions = array(
'lifetime' => 7,
'debug_header' => true,
'regexps' => array(
'^/$' => array('cache' => true),
'^/index/' => array('cache' => true)
)
);
$backendOptions = array('cache_dir' => '../application/cache/');
$cache = Zend_Cache::factory('Page', 'File', $frontendOptions, $backendOptions);
if(!$cache->start('mypage')) {
}
如何让它工作?我希望 html 代码应该保存在缓存文件夹中。