diff --git a/library/Zend/Locale/Data.php b/library/Zend/Locale/Data.php index c4331abd73..ed567c00fa 100644 --- a/library/Zend/Locale/Data.php +++ b/library/Zend/Locale/Data.php @@ -335,10 +335,15 @@ public static function getList($locale, $path, $value = false) $val = urlencode($val); $id = self::_filterCacheId('Zend_LocaleL_' . $locale . '_' . $path . '_' . $val); - if (!self::$_cacheDisabled && ($result = self::$_cache->load($id))) { - return unserialize($result); + if (!self::$_cacheDisabled && !empty(self::$_list[$id])) { + return self::$_list[$id]; } + if (!self::$_cacheDisabled && ($result = self::$_cache->load($id))) { + self::$_list[$id] = unserialize($result); + return self::$_list[$id]; + } + $temp = array(); switch(strtolower($path)) { case 'language': @@ -984,8 +989,13 @@ public static function getContent($locale, $path, $value = false) } $val = urlencode($val); $id = self::_filterCacheId('Zend_LocaleC_' . $locale . '_' . $path . '_' . $val); + if (!self::$_cacheDisabled && !empty(self::$_list[$id])) { + return self::$_list[$id]; + } + if (!self::$_cacheDisabled && ($result = self::$_cache->load($id))) { - return unserialize($result); + self::$_list[$id] = unserialize($result); + return self::$_list[$id]; } switch(strtolower($path)) {