X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Fobjectcache%2FReplicatedBagOStuff.php;h=5f2c509ed66ba2d413326e8b665b17d0ba86f329;hb=46272366d14254e0917a9de8688a7627354f4bdb;hp=9e80e9fd1a6c04c230672681f961c2a718f2590d;hpb=0a138f1acf224675f1a70eff8eea63c8d70a17dc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/objectcache/ReplicatedBagOStuff.php b/includes/libs/objectcache/ReplicatedBagOStuff.php index 9e80e9fd1a..5f2c509ed6 100644 --- a/includes/libs/objectcache/ReplicatedBagOStuff.php +++ b/includes/libs/objectcache/ReplicatedBagOStuff.php @@ -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() {