开发者

ini-config for Zend_Cache_Frontend_Page

How to configure Zend_Cache_Frontend_Page in application.ini? I cannot define regexps (see example http://framework.zend.com/manual/en/zend.cache.frontends.html#zend.cache.frontends.page.examples. It should be something like following

resources.cachemanager.page.frontend.options.regexps.^/$.cache = true

But it is 开发者_运维问答a bad ini-file syntax, it fails with

Zend_Config_Exception: syntax error, unexpected '$'


Not sure you can do it. According to parse_ini_file manual: Characters ?{}|&~![()^" must not be used anywhere in the key and have a special meaning in the value. Notice that ^ is in the set of these characters.

However, what is interesting, when you remove $ from your key, and leave only ^/ you should not get any error. So it seems that the problem is only with $. But I don't know how to use it as a key in a ini file.

In this situation I would recommend setting regexps in your Bootsrap.php. You could define custom variables in application.ini, regexps should be allowed in values, and add them to cachemanager resource in your Bootsrap.php.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜