From 511f02bf12b3d7440bca7c75c0e8885f7f69231a Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Mon, 21 Jul 2014 19:25:36 -0300 Subject: [PATCH] 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 --- includes/Collation.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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'] ) -- 2.20.1