re Bug #29283, r101507: Apply Vitaliy Filippov's followup fix:
authorMark A. Hershberger <mah@users.mediawiki.org>
Mon, 7 Nov 2011 17:50:54 +0000 (17:50 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Mon, 7 Nov 2011 17:50:54 +0000 (17:50 +0000)
    .... I've found another bug with the implementation - it also
    relies on the presence of key '...:preload' and doesn't check it
    when checking for the expired cache, which can lead to "Invalid or
    missing localisation cache" exceptions.

includes/LocalisationCache.php

index 1aaf836..aaa0245 100644 (file)
@@ -357,8 +357,9 @@ class LocalisationCache {
 
                $deps = $this->store->get( $code, 'deps' );
                $keys = $this->store->get( $code, 'list', 'messages' );
-               // 'list:messages' sometimes expires separately of 'deps' in LCStore_Accel
-               if ( $deps === null || $keys === null ) {
+               $preload = $this->store->get( $code, 'preload' );
+               // Different keys may expire separately, at least in LCStore_Accel
+               if ( $deps === null || $keys === null || $preload === null ) {
                        wfDebug( __METHOD__."($code): cache missing, need to make one\n" );
                        return true;
                }