Replace some calls to wfGetMainCache()

Change-Id: I9ba8fd5918877af6312b0854634bd36211438f00
This commit is contained in:
Aaron Schulz 2015-10-20 23:52:07 -07:00
parent e2c850b56e
commit 72734cfffa
2 changed files with 4 additions and 3 deletions

View file

@ -37,7 +37,7 @@ class LoadMonitorMySQL implements LoadMonitor {
$this->parent = $parent;
$this->srvCache = ObjectCache::newAccelerator( 'hash' );
$this->mainCache = wfGetMainCache();
$this->mainCache = ObjectCache::getLocalClusterInstance();
}
public function scaleLoads( &$loads, $group = false, $wiki = false ) {

View file

@ -136,9 +136,10 @@ class SwiftFileBackend extends FileBackendStore {
// 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 {