This store is used for ChronologyProtector positions.
It should be cross-DC since the sticky DC cookie may not work
for rapid cross-wiki farm activity, causing some request go to
the non-primary DC.
NOTE: this change should be deployed on all farm wikis at once
Change-Id: Ife126592aacace696e43912b9461164a9ea98bc1
+ $services = MediaWikiServices::getInstance();
+
// Use APC/memcached style caching, but avoids loops with CACHE_DB (T141804)
// 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;
}
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;
}
if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) {
$lbConf['wanCache'] = $wCache;
}