Issues

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

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.

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.

I resolve this issue with the Duplicate status, because ZF-7058 is reopened.