X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fobjectcache%2FMultiWriteBagOStuff.php;h=04ed89478cb65c32ff777c8a24df4db55de9e94d;hb=fd8f1f93061f147a046b5334dfd6a5b943877fb3;hp=6a691379a0e9e5d4fc8fa5ceb4a513b825b8da12;hpb=27eafef2947051a2d5d2ee024e0c23f518b786be;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/objectcache/MultiWriteBagOStuff.php b/includes/objectcache/MultiWriteBagOStuff.php index 6a691379a0..04ed89478c 100644 --- a/includes/objectcache/MultiWriteBagOStuff.php +++ b/includes/objectcache/MultiWriteBagOStuff.php @@ -81,6 +81,7 @@ class MultiWriteBagOStuff extends BagOStuff { * @param mixed $value * @param mixed $exptime * @return bool + * @throws MWException */ public function cas( $casToken, $key, $value, $exptime = 0 ) { throw new MWException( "CAS is not implemented in " . __CLASS__ ); @@ -136,12 +137,13 @@ class MultiWriteBagOStuff extends BagOStuff { /** * @param string $key * @param int $timeout + * @param int $expiry * @return bool */ - public function lock( $key, $timeout = 0 ) { + public function lock( $key, $timeout = 6, $expiry = 6 ) { // Lock only the first cache, to avoid deadlocks if ( isset( $this->caches[0] ) ) { - return $this->caches[0]->lock( $key, $timeout ); + return $this->caches[0]->lock( $key, $timeout, $expiry ); } else { return true; }