Merge "Allow stop characters as quoted attribute delimiters"
[lhc/web/wiklou.git] / includes / db / LoadMonitorMySQL.php
index 433b495..3008419 100644 (file)
@@ -34,12 +34,10 @@ class LoadMonitorMySQL implements LoadMonitor {
        protected $mainCache;
 
        public function __construct( $parent ) {
-               global $wgMemc;
-
                $this->parent = $parent;
 
-               $this->srvCache = ObjectCache::newAccelerator( array(), 'hash' );
-               $this->mainCache = $wgMemc ?: wfGetMainCache();
+               $this->srvCache = ObjectCache::newAccelerator( 'hash' );
+               $this->mainCache = wfGetMainCache();
        }
 
        public function scaleLoads( &$loads, $group = false, $wiki = false ) {
@@ -79,6 +77,7 @@ class LoadMonitorMySQL implements LoadMonitor {
                if ( $this->mainCache->lock( $key, 0, 10 ) ) {
                        # Let this process alone update the cache value
                        $cache = $this->mainCache;
+                       /** @noinspection PhpUnusedLocalVariableInspection */
                        $unlocker = new ScopedCallback( function () use ( $cache, $key ) {
                                $cache->unlock( $key );
                        } );