* the documentation of $wgObjectCaches for more detail.
*
* @param array $params
- * @throws MWException
+ * @throws InvalidArgumentException
*/
public function __construct( $params ) {
parent::__construct( $params );
if ( !isset( $params['caches'] ) ) {
- throw new MWException( __METHOD__ . ': the caches parameter is required' );
+ throw new InvalidArgumentException( __METHOD__ . ': the caches parameter is required' );
}
$this->caches = array();
$this->doWrite( 'setDebug', $debug );
}
- /**
- * @param string $key
- * @param mixed $casToken [optional]
- * @return bool|mixed
- */
- public function get( $key, &$casToken = null ) {
+ public function get( $key, &$casToken = null, $flags = 0 ) {
foreach ( $this->caches as $cache ) {
- $value = $cache->get( $key );
+ $value = $cache->get( $key, $casToken, $flags );
if ( $value !== false ) {
return $value;
}
return false;
}
- /**
- * @param mixed $casToken
- * @param string $key
- * @param mixed $value
- * @param mixed $exptime
- * @return bool
- * @throws MWException
- */
- protected function cas( $casToken, $key, $value, $exptime = 0 ) {
- throw new MWException( "CAS is not implemented in " . __CLASS__ );
- }
-
/**
* @param string $key
* @param mixed $value