* @ingroup Cache
*/
class EmptyBagOStuff extends BagOStuff {
- function get( $key ) {
+
+ /**
+ * @param $key string
+ * @param $casToken[optional] mixed
+ * @return bool
+ */
+ function get( $key, &$casToken = null ) {
return false;
}
+ /**
+ * @param $key string
+ * @param $value mixed
+ * @param $exp int
+ * @return bool
+ */
function set( $key, $value, $exp = 0 ) {
return true;
}
+ /**
+ * @param $casToken mixed
+ * @param $key string
+ * @param $value mixed
+ * @param $exp int
+ * @return bool
+ */
+ function cas( $casToken, $key, $value, $exp = 0 ) {
+ return true;
+ }
+
+ /**
+ * @param $key string
+ * @param $time int
+ * @return bool
+ */
function delete( $key, $time = 0 ) {
return true;
}
-}
-/**
- * Backwards compatibility alias for EmptyBagOStuff
- * @deprecated since 1.18
- */
-class FakeMemCachedClient extends EmptyBagOStuff {
+ /**
+ * @param $key string
+ * @param $callback closure 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;
+ }
}