* @ingroup Cache
*/
class MultiWriteBagOStuff extends BagOStuff {
- /** @var array BagOStuff[] */
+ /** @var BagOStuff[] */
protected $caches;
/**
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;
}
* @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;
}