From: Brian Wolff Date: Mon, 21 Jul 2014 22:25:36 +0000 (-0300) Subject: Include ICU version in cache key for collation first letters X-Git-Tag: 1.31.0-rc.0~14797^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=511f02bf12b3d7440bca7c75c0e8885f7f69231a;p=lhc%2Fweb%2Fwiklou.git Include ICU version in cache key for collation first letters The cache key is only valid for specific versions of icu extension. If you upgrade php, the cache key should get refreshed. Note: Changing your version of icu (e.g. by upgrading php) still requires updateCollation.php --force to be run. This patch does nothing to change that. Note: Have not tested on hhvm, which is what the original bug report was about. Bug: 68344 Change-Id: Ib5ac2adc34a5a120b916cebcf62ff3d6ee057403 --- diff --git a/includes/Collation.php b/includes/Collation.php index 71adb096cb..9bb725f9e7 100644 --- a/includes/Collation.php +++ b/includes/Collation.php @@ -365,7 +365,12 @@ class IcuCollation extends Collation { } $cache = wfGetCache( CACHE_ANYTHING ); - $cacheKey = wfMemcKey( 'first-letters', $this->locale, $this->digitTransformLanguage->getCode() ); + $cacheKey = wfMemcKey( + 'first-letters', + $this->locale, + $this->digitTransformLanguage->getCode(), + self::getICUVersion() + ); $cacheEntry = $cache->get( $cacheKey ); if ( $cacheEntry && isset( $cacheEntry['version'] )