diff --git a/lib/Zend/Locale/Data.php b/lib/Zend/Locale/Data.php index a3686da3b0c..f295fd01b26 100644 --- a/lib/Zend/Locale/Data.php +++ b/lib/Zend/Locale/Data.php @@ -343,8 +343,8 @@ public static function getList($locale, $path, $value = false) $val = urlencode($val); $id = self::_filterCacheId('Zend_LocaleL_' . $locale . '_' . $path . '_' . $val); - // add runtime cache to avoid callng cache backend multiple times during one request - if ( isset(self::$_localCache[$id])) { + // add runtime cache to avoid calling cache backend multiple times during one request + if (isset(self::$_localCache[$id])) { return self::$_localCache[$id]; } if (!self::$_cacheDisabled && ($result = self::$_cache->load($id))) { @@ -1000,6 +1000,11 @@ public static function getContent($locale, $path, $value = false) } $val = urlencode($val); $id = self::_filterCacheId('Zend_LocaleC_' . $locale . '_' . $path . '_' . $val); + + // add runtime cache to avoid calling cache backend multiple times during one request + if (isset(self::$_localCache[$id])) { + return self::$_localCache[$id]; + } if (!self::$_cacheDisabled && ($result = self::$_cache->load($id))) { $result = unserialize($result); self::$_localCache[$id] = $result;