From: Aaron Schulz Date: Thu, 19 Jul 2018 23:40:02 +0000 (+0100) Subject: Convert Title::getTitleCache() to using MapCacheLRU (again) X-Git-Tag: 1.34.0-rc.0~4700^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22config_fonctions%22%2C%20%22image_process=%24process%22%29%20.%20%22?a=commitdiff_plain;h=3d990d17a0315e512d2522a1abe18aa73e7da173;p=lhc%2Fweb%2Fwiklou.git Convert Title::getTitleCache() to using MapCacheLRU (again) Re-applies commit 7a25cd388c8adcce6, reverted by 3648e5683c0ff11c0. Change-Id: I087edb15fbe11ccac7be28540e20d990f5615c4e --- 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; }