Merge "Revert "Convert Title::getTitleCache() to using MapCacheLRU""
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 17 Jul 2018 07:15:45 +0000 (07:15 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 17 Jul 2018 07:15:45 +0000 (07:15 +0000)
includes/Title.php

index b583554..8586ad7 100644 (file)
@@ -37,7 +37,7 @@ use MediaWiki\MediaWikiServices;
  *       and does not rely on global state or the database.
  */
 class Title implements LinkTarget {
-       /** @var MapCacheLRU */
+       /** @var HashBagOStuff */
        static private $titleCache = null;
 
        /**
@@ -371,11 +371,11 @@ class Title implements LinkTarget {
        }
 
        /**
-        * @return MapCacheLRU
+        * @return HashBagOStuff
         */
        private static function getTitleCache() {
                if ( self::$titleCache == null ) {
-                       self::$titleCache = new MapCacheLRU( self::CACHE_MAX );
+                       self::$titleCache = new HashBagOStuff( [ 'maxKeys' => self::CACHE_MAX ] );
                }
                return self::$titleCache;
        }