Merge "Sync up with Parsoid parserTests.txt"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 10 Nov 2017 01:07:59 +0000 (01:07 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 10 Nov 2017 01:07:59 +0000 (01:07 +0000)
includes/db/MWLBFactory.php

index 5196ac2..aa1918d 100644 (file)
@@ -142,16 +142,18 @@ abstract class MWLBFactory {
                        }
                }
 
+               $services = MediaWikiServices::getInstance();
+
                // Use APC/memcached style caching, but avoids loops with CACHE_DB (T141804)
-               $sCache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
+               $sCache = $services->getLocalServerObjectCache();
                if ( $sCache->getQoS( $sCache::ATTR_EMULATION ) > $sCache::QOS_EMULATION_SQL ) {
                        $lbConf['srvCache'] = $sCache;
                }
-               $cCache = ObjectCache::getLocalClusterInstance();
-               if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) > $cCache::QOS_EMULATION_SQL ) {
-                       $lbConf['memStash'] = $cCache;
+               $mStash = $services->getMainObjectStash();
+               if ( $mStash->getQoS( $mStash::ATTR_EMULATION ) > $mStash::QOS_EMULATION_SQL ) {
+                       $lbConf['memStash'] = $mStash;
                }
-               $wCache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+               $wCache = $services->getMainWANObjectCache();
                if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) {
                        $lbConf['wanCache'] = $wCache;
                }