Php 引导中的初始化Zend_缓存(UTF-8)
我正在尝试从引导程序中兑现控制器 我有一个名为questionController的控制器,我用的是阿拉伯语 当我缓存questionController(如下面的代码)时,它工作正常。但是,当我将路由添加到此控制器时,如我的.local/ائله添加到questionController缓存不起作用它唯一起作用的是,当我直接用控制器的名称,但用他的路由(阿拉伯语)名称调用控制器时,它不起作用 myBootstrap.php中的函数是Php 引导中的初始化Zend_缓存(UTF-8),php,zend-framework,zend-cache,Php,Zend Framework,Zend Cache,我正在尝试从引导程序中兑现控制器 我有一个名为questionController的控制器,我用的是阿拉伯语 当我缓存questionController(如下面的代码)时,它工作正常。但是,当我将路由添加到此控制器时,如我的.local/ائله添加到questionController缓存不起作用它唯一起作用的是,当我直接用控制器的名称,但用他的路由(阿拉伯语)名称调用控制器时,它不起作用 myBootstrap.php中的函数是 protected function _initCache(
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();
}
而我的溃败是
$router->addRoute('questionRout', new Zend_Controller_Router_Route('اسئله', array('controller' => 'question', 'action' => 'view')));
my.local/question--->缓存工作
my.local/االه-->不工作
我使用了mb_内部编码(“UTF-8”)
请帮帮我
感谢您在缓存的前端选项中隔离出要包含在缓存中的/question url slug
'/question' => array('cache' => true),
因此,这将排除其他路径 谢谢你的回答。但它的工作,当我进入/质疑它的缓存时,它很好,但/却不工作。