Don't call mediawikiservices::getMainWANObjectCache if not needed

Change-Id: Iafbd3dfd0dfaec26c2f2b0b28b1b0dfecffd2a27
This commit is contained in:
DannyS712 2020-03-08 10:00:04 +00:00
parent 72f30649d5
commit ee8118da41

View file

@ -263,12 +263,12 @@ class EchoNotificationController {
* @return EchoContainmentList|null
*/
protected static function getWikiBlacklist() {
$clusterCache = MediaWikiServices::getInstance()->getMainWANObjectCache();
global $wgEchoOnWikiBlacklist;
if ( !$wgEchoOnWikiBlacklist ) {
return null;
}
if ( self::$wikiBlacklist === null ) {
$clusterCache = MediaWikiServices::getInstance()->getMainWANObjectCache();
self::$wikiBlacklist = new EchoCachedList(
$clusterCache,
$clusterCache->makeKey( "echo_on_wiki_blacklist" ),