ZF-10720: set locale cache via config
Description
I believe that there's no way to set a cache for Zend_Locale in application.ini.
The default behaviour is to cache locale informations in files located in /tmp/. If I want to store locale informations in a sqlite db, I should write "somewhere":
`
or, obviously, build my own resource.
if (!empty($options['cache'])) { $bootstrap = $this->getBootstrap(); $bootstrap->bootstrap('cachemanager'); $cachemanager = $bootstrap->getContainer()->cachemanager; if ($cachemanager->hasCacheTemplate($options['cache'])) Zend_Locale::setCache($cachemanager->getCache($options['cache'])); } ```
It could be a native behaviour.
This is a sort of duplicate of ZF-7058, closed since incomplete (unclear).
Comments
Posted by Pawel Szczekutowicz (fenoms) on 2011-02-03T11:58:32.000+0000
if you add a public method setCache i will be possible to set the cache using resource not only by configuration file but also by this method. I think that the way this is solved in Db resource is best.
Posted by Thomas Weidner (thomas) on 2011-02-06T14:03:02.000+0000
No for using Bootstrap within Zend_Locale. This would add a fixed relation to the component which is not allowed.
In environments without bootstrap Zend_Locale would no longer be usable.
Posted by Benoît Durand (intiilapa) on 2011-02-17T12:38:48.000+0000
I resolve this issue with the Duplicate status, because ZF-7058 is reopened.