objectcache: add setMockTime() method to BagOStuff/WANObjectCache
[lhc/web/wiklou.git] / includes / libs / objectcache / MemcachedPhpBagOStuff.php
index 1bb38fa..3ff390b 100644 (file)
@@ -42,7 +42,7 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff {
                parent::__construct( $params );
                $params = $this->applyDefaultParams( $params );
 
-               $this->client = new MWMemcached( $params );
+               $this->client = new MemcachedClient( $params );
                $this->client->set_servers( $params['servers'] );
                $this->client->set_debug( $params['debug'] );
        }
@@ -62,12 +62,12 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff {
        public function incr( $key, $value = 1 ) {
                $this->validateKeyEncoding( $key );
 
-               return $this->client->incr( $key, $value );
+               return $this->client->incr( $key, $value ) ?? false;
        }
 
        public function decr( $key, $value = 1 ) {
                $this->validateKeyEncoding( $key );
 
-               return $this->client->decr( $key, $value );
+               return $this->client->decr( $key, $value ) ?? false;
        }
 }