I'm using this function in Bootstrap.php to cache my controllers , and i need to cache some controllers only I don't need to cache index controller and article controller as an example and i need to cache question controller but it does not working . this function is cached all my controllers
protected function _initCache()
{
mb_internal_encoding("UTF-8");
$dir = "/var/www/data/cache/all";
$frontendOptions = array(
'lifetime' => 3600,
'content_type_memorization' => true,
'default_options' => array(
'cache' => true,
'cache_with_get_variables' => true,
'cache_with_post_variables' => true,
'cache_with_session_variables' => true,
'cache_with_cookie_variables' => true,
),
'regexps' => array(
'^/$' => array('cache' => false),
"^/question/" => array('cache' => true),
"^/article/" => array('cache' => false),
)
);
$backendOptions = array(
'cache_dir' =>$dir
);
// getting a Zend_Cache_Frontend_Page object
$cache = Zend_Cache::factory('Page',
'File',
$frontendOptions,
$backendOptions);
$cache->start();
}
so what i can do I tried all soluations please help me. Thanks