From: Aaron Schulz Date: Wed, 11 Jul 2018 13:07:10 +0000 (+0100) Subject: Convert Title::getTitleCache() to using MapCacheLRU X-Git-Tag: 1.34.0-rc.0~4744^2~1 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=7a25cd388c8adcce6;p=lhc%2Fweb%2Fwiklou.git Convert Title::getTitleCache() to using MapCacheLRU Change-Id: I0de4194a37b6ef260d35feb1e6730985775d5351 --- diff --git a/includes/Title.php b/includes/Title.php index 8586ad762d..b583554ab4 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -37,7 +37,7 @@ use MediaWiki\MediaWikiServices; * and does not rely on global state or the database. */ class Title implements LinkTarget { - /** @var HashBagOStuff */ + /** @var MapCacheLRU */ static private $titleCache = null; /** @@ -371,11 +371,11 @@ class Title implements LinkTarget { } /** - * @return HashBagOStuff + * @return MapCacheLRU */ private static function getTitleCache() { if ( self::$titleCache == null ) { - self::$titleCache = new HashBagOStuff( [ 'maxKeys' => self::CACHE_MAX ] ); + self::$titleCache = new MapCacheLRU( self::CACHE_MAX ); } return self::$titleCache; }