User: Migrate from foreign cache to global cache for UserRightsProxy
[lhc/web/wiklou.git] / includes / objectcache / ObjectCache.php
index 59c3c1f..abb88ba 100644 (file)
@@ -137,19 +137,14 @@ class ObjectCache {
         * @return string
         */
        public static function getDefaultKeyspace() {
-               global $wgCachePrefix, $wgDBname, $wgDBprefix;
+               global $wgCachePrefix;
 
                $keyspace = $wgCachePrefix;
                if ( is_string( $keyspace ) && $keyspace !== '' ) {
                        return $keyspace;
                }
 
-               $keyspace = $wgDBname;
-               if ( is_string( $wgDBprefix ) && $wgDBprefix !== '' ) {
-                       $keyspace .= '-' . $wgDBprefix;
-               }
-
-               return $keyspace;
+               return wfWikiID();
        }
 
        /**
@@ -269,7 +264,7 @@ class ObjectCache {
                        }
                        $id = $fallback;
                }
-               return self::newFromId( $id );
+               return self::getInstance( $id );
        }
 
        /**