I'm tryng to Cashe controllers from Bootstrap
I have controller called questionController and I'm using Arabic language when I cached the questionController (like code below) its work properly . but when I added routing to this controller like my.local/اسئله to questionController cache dose not work its only work when i call controller directly with his name but with his routing (Arabic) name dose not work.
my function function in my Bootstrap.php is
protected function _initCache()
{
mb_internal_encoding("UTF-8");
$dir = "/var/www/data/cache/";
$frontendOptions = array(
'lifetime' => 10800,
'automatic_serialization' => true,
'debug_header' => true,
'regexps' => array(
'$' => array('cache' => false),
'/question' => array('cache' => true),
),
'default_options' => array(
'cache_with_cookie_variables' => true,
'make_id_with_cookie_variables' => false
)
);
$backendOptions = array(
'cache_dir' =>$dir
);
$cache = Zend_Cache::factory('Page',
'File',
$frontendOptions,
$backendOptions);
$cache->start();
}
and my rout is
$router->addRoute('questionRout', new Zend_Controller_Router_Route('اسئله', array('controller' => 'question', 'action' => 'view')));
my.local/question ---> cache working
my.local/اسئله ---> not working and I used mb_internal_encoding("UTF-8").
Please help me Thanks