Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/Zend/Locale/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down Expand Up @@ -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;
Expand Down