$this->parent = $parent;
$this->srvCache = ObjectCache::newAccelerator( 'hash' );
- $this->mainCache = wfGetMainCache();
+ $this->mainCache = ObjectCache::getLocalClusterInstance();
}
public function scaleLoads( &$loads, $group = false, $wiki = false ) {
// Cache auth token information to avoid RTTs
if ( !empty( $config['cacheAuthInfo'] ) ) {
if ( PHP_SAPI === 'cli' ) {
- $this->srvCache = wfGetMainCache(); // preferrably memcached
+ // Preferrably memcached
+ $this->srvCache = ObjectCache::getLocalClusterInstance();
} else {
- // look for APC, XCache, WinCache, ect...
+ // Look for APC, XCache, WinCache, ect...
$this->srvCache = ObjectCache::newAccelerator( CACHE_NONE );
}
} else {