PHP try catch无法使用Zend缓存异常
我有这段代码来启动Zend Cache,我将try Cache异常设置为如果在该过程中出现错误,则取消Zend Cache,但它不起作用,并且不会在catch exception中打印错误PHP try catch无法使用Zend缓存异常,php,zend-framework,zend-cache,Php,Zend Framework,Zend Cache,我有这段代码来启动Zend Cache,我将try Cache异常设置为如果在该过程中出现错误,则取消Zend Cache,但它不起作用,并且不会在catch exception中打印错误 $frontendOptions = array( 'lifetime' => $cacheTime, 'content_type_memorization' => false, 'default_options' => array
$frontendOptions = array(
'lifetime' => $cacheTime,
'content_type_memorization' => false,
'default_options' => array(
'cache' => true,
'make_id_with_cookie_variables' => false,
'make_id_with_session_variables' => false,
'cache_with_get_variables' => true,
'cache_with_post_variables' => true,
'cache_with_session_variables' => true,
'cache_with_files_variables' => true,
'cache_with_cookie_variables' => true,
'tags' => $cacheTag,
),
'regexps' => array(
'$' => array('cache' => true),
)
);
$backendOptions = array('cache_dir' => '/var');
$cache = Zend_Cache::factory('Page', 'File', $frontendOptions, $backendOptions);
try {
$cache->start();
} catch (Exception $exc) {
echo $exc->getMessage();
}
我尝试了$cache->cancel,但没有任何结果
谢谢