Merge "jquery.makeCollapsible: Move functions out of the var statement"
[lhc/web/wiklou.git] / includes / objectcache / MemcachedPeclBagOStuff.php
index 7793710..36f5ead 100644 (file)
@@ -104,14 +104,16 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
 
        /**
         * @param $key string
+        * @param $casToken[optional] float
         * @return Mixed
         */
-       public function get( $key ) {
+       public function get( $key, &$casToken = null ) {
                wfProfileIn( __METHOD__ );
                $this->debugLog( "get($key)" );
-               $value = $this->checkResult( $key, parent::get( $key ) );
+               $result = $this->client->get( $this->encodeKey( $key ), null, $casToken );
+               $result = $this->checkResult( $key, $result );
                wfProfileOut( __METHOD__ );
-               return $value;
+               return $result;
        }
 
        /**
@@ -125,6 +127,18 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                return $this->checkResult( $key, parent::set( $key, $value, $exptime ) );
        }
 
+       /**
+        * @param $casToken float
+        * @param $key string
+        * @param $value
+        * @param $exptime int
+        * @return bool
+        */
+       public function cas( $casToken, $key, $value, $exptime = 0 ) {
+               $this->debugLog( "cas($key)" );
+               return $this->checkResult( $key, parent::cas( $casToken, $key, $value, $exptime ) );
+       }
+
        /**
         * @param $key string
         * @param $time int
@@ -192,7 +206,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
         * the client, but some day we might find a case where it should be
         * different.
         *
-        * @param $key string The key used by the caller, or false if there wasn't one.
+        * @param string $key The key used by the caller, or false if there wasn't one.
         * @param $result Mixed The return value
         * @return Mixed
         */