Merge "Use User::equals() where applicable in the class"
[lhc/web/wiklou.git] / includes / objectcache / MultiWriteBagOStuff.php
index 3a30f83..bbfaa5e 100644 (file)
@@ -29,7 +29,7 @@
  * @ingroup Cache
  */
 class MultiWriteBagOStuff extends BagOStuff {
-       /** @var array BagOStuff[] */
+       /** @var BagOStuff[] */
        protected $caches;
 
        /**
@@ -63,7 +63,7 @@ class MultiWriteBagOStuff extends BagOStuff {
 
        public function get( $key, &$casToken = null, $flags = 0 ) {
                foreach ( $this->caches as $cache ) {
-                       $value = $cache->get( $key, null, $flags = 0 );
+                       $value = $cache->get( $key, $casToken, $flags );
                        if ( $value !== false ) {
                                return $value;
                        }
@@ -121,12 +121,13 @@ class MultiWriteBagOStuff extends BagOStuff {
         * @param string $key
         * @param int $timeout
         * @param int $expiry
+        * @param string $rclass
         * @return bool
         */
-       public function lock( $key, $timeout = 6, $expiry = 6 ) {
+       public function lock( $key, $timeout = 6, $expiry = 6, $rclass = '' ) {
                // Lock only the first cache, to avoid deadlocks
                if ( isset( $this->caches[0] ) ) {
-                       return $this->caches[0]->lock( $key, $timeout, $expiry );
+                       return $this->caches[0]->lock( $key, $timeout, $expiry, $rclass );
                } else {
                        return true;
                }