PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Speed up Zend_Locale and its subclasses

Zend_Locale and its subclasses can be speeded up by the usage of Zend_Cache. Use the static method Zend_Locale::setCache($cache) if you are using Zend_Locale. Zend_Locale_Format can be speeded up the using the option cache within Zend_Locale_Format::setOptions(array('cache' => $adapter));. If you are using both classes you should only set the cache for Zend_Locale, otherwise the last set cache will overwrite the previous set cache. For convenience there are also the static methods getCache(), hasCache(), clearCache() and removeCache().

When no cache is set, then Zend_Locale will automatically set a cache itself. Sometimes it is wished to prevent that a cache is set, even if this degrades performance. In this case the static disableCache(true) method should be used. It does not only disable the actual set cache, without erasing it, but also prevents that a cache is automatically generated when no cache is set.

Zend Framework