* Added WikiPage::getParserOutput() and changed Article::getParserOutput() to use it
[lhc/web/wiklou.git] / includes / LocalisationCache.php
index 7e650a9..ad707dc 100644 (file)
@@ -196,7 +196,7 @@ class LocalisationCache {
         * @return bool
         */
        public function isMergeableKey( $key ) {
-               if ( !isset( $this->mergeableKeys ) ) {
+               if ( $this->mergeableKeys === null ) {
                        $this->mergeableKeys = array_flip( array_merge(
                                self::$mergeableMapKeys,
                                self::$mergeableListKeys,
@@ -215,7 +215,7 @@ class LocalisationCache {
         * need to fetch all of the subitems from the cache individually.
         * @param $code
         * @param $key
-        * @return string
+        * @return mixed
         */
        public function getItem( $code, $key ) {
                if ( !isset( $this->loadedItems[$code][$key] ) ) {
@@ -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;
                }
@@ -1136,7 +1137,7 @@ class LocalisationCache_BulkLoad extends LocalisationCache {
        /**
         * @param $code
         * @param $key
-        * @return string
+        * @return mixed
         */
        public function getItem( $code, $key ) {
                unset( $this->mruLangs[$code] );