Merge "DatabaseMssql: Don't duplicate body of makeList()"
[lhc/web/wiklou.git] / includes / objectcache / MultiWriteBagOStuff.php
index 04ed894..f9a8cfe 100644 (file)
@@ -43,6 +43,7 @@ class MultiWriteBagOStuff extends BagOStuff {
         * @throws MWException
         */
        public function __construct( $params ) {
+               parent::__construct( $params );
                if ( !isset( $params['caches'] ) ) {
                        throw new MWException( __METHOD__ . ': the caches parameter is required' );
                }
@@ -83,7 +84,7 @@ class MultiWriteBagOStuff extends BagOStuff {
         * @return bool
         * @throws MWException
         */
-       public function cas( $casToken, $key, $value, $exptime = 0 ) {
+       protected function cas( $casToken, $key, $value, $exptime = 0 ) {
                throw new MWException( "CAS is not implemented in " . __CLASS__ );
        }
 
@@ -99,11 +100,10 @@ class MultiWriteBagOStuff extends BagOStuff {
 
        /**
         * @param string $key
-        * @param int $time
         * @return bool
         */
-       public function delete( $key, $time = 0 ) {
-               return $this->doWrite( 'delete', $key, $time );
+       public function delete( $key ) {
+               return $this->doWrite( 'delete', $key );
        }
 
        /**
@@ -163,12 +163,12 @@ class MultiWriteBagOStuff extends BagOStuff {
 
        /**
         * @param string $key
-        * @param Closure $callback Callback method to be executed
+        * @param callable $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 ) {
+       public function merge( $key, $callback, $exptime = 0, $attempts = 10 ) {
                return $this->doWrite( 'merge', $key, $callback, $exptime );
        }