Merge "autocomplete: fix duplicate/missing tracking events"
[lhc/web/wiklou.git] / includes / libs / objectcache / ReplicatedBagOStuff.php
index 9e80e9f..5f2c509 100644 (file)
@@ -39,9 +39,9 @@ class ReplicatedBagOStuff extends BagOStuff {
 
        /**
         * Constructor. Parameters are:
-        *   - writeFactory : ObjectFactory::getObjectFromSpec parameters yeilding BagOStuff.
+        *   - writeFactory : ObjectFactory::getObjectFromSpec array yeilding BagOStuff.
         *                    This object will be used for writes (e.g. the master DB).
-        *   - readFactory  : ObjectFactory::getObjectFromSpec parameters yeilding BagOStuff.
+        *   - readFactory  : ObjectFactory::getObjectFromSpec array yeilding BagOStuff.
         *                    This object will be used for reads (e.g. a slave DB).
         *
         * @param array $params
@@ -72,10 +72,10 @@ class ReplicatedBagOStuff extends BagOStuff {
                $this->readStore->setDebug( $debug );
        }
 
-       public function get( $key, &$casToken = null, $flags = 0 ) {
+       protected function doGet( $key, $flags = 0 ) {
                return ( $flags & self::READ_LATEST )
-                       ? $this->writeStore->get( $key, $casToken, $flags )
-                       : $this->readStore->get( $key, $casToken, $flags );
+                       ? $this->writeStore->get( $key, $flags )
+                       : $this->readStore->get( $key, $flags );
        }
 
        public function getMulti( array $keys, $flags = 0 ) {
@@ -84,8 +84,8 @@ class ReplicatedBagOStuff extends BagOStuff {
                        : $this->readStore->getMulti( $keys, $flags );
        }
 
-       public function set( $key, $value, $exptime = 0 ) {
-               return $this->writeStore->set( $key, $value, $exptime );
+       public function set( $key, $value, $exptime = 0, $flags = 0 ) {
+               return $this->writeStore->set( $key, $value, $exptime, $flags );
        }
 
        public function delete( $key ) {
@@ -112,8 +112,8 @@ class ReplicatedBagOStuff extends BagOStuff {
                return $this->writeStore->unlock( $key );
        }
 
-       public function merge( $key, $callback, $exptime = 0, $attempts = 10 ) {
-               return $this->writeStore->merge( $key, $callback, $exptime, $attempts );
+       public function merge( $key, callable $callback, $exptime = 0, $attempts = 10, $flags = 0 ) {
+               return $this->writeStore->merge( $key, $callback, $exptime, $attempts, $flags );
        }
 
        public function getLastError() {