Merge "mediawiki.language: Fix infinite loop in commafy() when pattern has no grouping"
[lhc/web/wiklou.git] / includes / objectcache / EmptyBagOStuff.php
index abc6bcf..9595b83 100644 (file)
  * @ingroup Cache
  */
 class EmptyBagOStuff extends BagOStuff {
-       function get( $key ) {
+
+       /**
+        * @param string $key
+        * @param mixed $casToken [optional]
+        * @return bool
+        */
+       function get( $key, &$casToken = null ) {
                return false;
        }
 
+       /**
+        * @param string $key
+        * @param mixed $value
+        * @param int $exp
+        * @return bool
+        */
        function set( $key, $value, $exp = 0 ) {
                return true;
        }
 
+       /**
+        * @param mixed $casToken
+        * @param string $key
+        * @param mixed $value
+        * @param int $exp
+        * @return bool
+        */
+       function cas( $casToken, $key, $value, $exp = 0 ) {
+               return true;
+       }
+
+       /**
+        * @param string $key
+        * @param int $time
+        * @return bool
+        */
        function delete( $key, $time = 0 ) {
                return true;
        }
-}
 
-/**
- * Backwards compatibility alias for EmptyBagOStuff
- * @deprecated since 1.18
- */
-class FakeMemCachedClient extends EmptyBagOStuff {
+       /**
+        * @param string $key
+        * @param Closure $callback Callback method to be executed
+        * @param int $exptime Either an interval in seconds or a unix timestamp for expiry
+        * @param int $attempts The amount of times to attempt a merge in case of failure
+        * @return bool Success
+        */
+       public function merge( $key, Closure $callback, $exptime = 0, $attempts = 10 ) {
+               return true;
+       }
 }