好的,问题来了:
$frontendOptions = array(
'lifetime' => 7200,
'debug_header' => true, // for debugging, but it doesn't work...
'regexps' => array(
// Cache the static pages
'^/pages/' => array('cache' => true),
)
);
$backendOptions = $config->cache->backOptions->toArray();
// getting a Zend_Cache_Frontend_Page object
require_once 'Zend/Cache.php';
$cache = Zend_Cache::factory('Page',
$config->cache->backend,
$frontendOptions,
$backendOptions);
$cache->start();
这根本没有任何作用。页面加载时间完全相同,并且指示的文件夹$backendOptions
为空。我究竟做错了什么?
顺便说一句:$config->cache->backend
读取"file"
.