ZF-10720: set locale cache via config

Issue Type: Improvement Created: 2010-11-21T05:26:47.000+0000 Last Updated: 2011-02-17T12:38:49.000+0000 Status: Resolved Fix version(s): Reporter: Sergio Vaccaro (hujuice) Assignee: Benoît Durand (intiilapa) Tags: - Zend_Application_Resource

  • Zend_Locale

Related issues: - ZF-7058



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":

<pre class="highlight">`
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).


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.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.