From: Aaron Schulz Date: Wed, 21 Oct 2015 06:52:07 +0000 (-0700) Subject: Replace some calls to wfGetMainCache() X-Git-Tag: 1.31.0-rc.0~9307^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=72734cfffafa797cbcb5eea9f416f47d6e842e92;p=lhc%2Fweb%2Fwiklou.git Replace some calls to wfGetMainCache() Change-Id: I9ba8fd5918877af6312b0854634bd36211438f00 --- diff --git a/includes/db/loadbalancer/LoadMonitorMySQL.php b/includes/db/loadbalancer/LoadMonitorMySQL.php index 39ced1be88..f49e965e91 100644 --- a/includes/db/loadbalancer/LoadMonitorMySQL.php +++ b/includes/db/loadbalancer/LoadMonitorMySQL.php @@ -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 ) { diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index 408194f49e..e72d026205 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -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 {