mCache = ( $params['masterCache'] instanceof BagOStuff ) ? $params['masterCache'] : ObjectCache::newFromParams( $params['masterCache'] ); $this->sCache = ( $params['slaveCache'] instanceof BagOStuff ) ? $params['slaveCache'] : ObjectCache::newFromParams( $params['slaveCache'] ); } public function setDebug( $debug ) { $this->mCache->setDebug( $debug ); $this->sCache->setDebug( $debug ); } public function get( $key, &$casToken = null ) { return $this->sCache->get( $key, $casToken ); } public function getMulti( $keys ) { return $this->sCache->getMulti( $keys ); } public function set( $key, $value, $exptime = 0 ) { return $this->mCache->set( $key, $value, $exptime ); } public function delete( $key ) { return $this->mCache->delete( $key ); } public function add( $key, $value, $exptime = 0 ) { return $this->mCache->add( $key, $value, $exptime ); } public function incr( $key, $value = 1 ) { return $this->mCache->incr( $key, $value ); } public function decr( $key ) { return $this->mCache->decr( $key ); } public function lock( $key, $timeout = 6, $expiry = 6 ) { return $this->mCache->lock( $key, $timeout, $expiry ); } public function unlock( $key ) { return $this->mCache->unlock( $key ); } public function merge( $key, $callback, $exptime = 0, $attempts = 10 ) { return $this->mCache->merge( $key, $callback, $exptime, $attempts ); } public function getLastError() { return ( $this->mCache->getLastError() != self::ERR_NONE ) ? $this->mCache->getLastError() : $this->sCache->getLastError(); } public function clearLastError() { $this->mCache->clearLastError(); $this->sCache->clearLastError(); } }