46 unset(
$params[
'reportDupes'] );
54 public function get( $key, $flags = 0 ) {
55 $ret = parent::get( $key, $flags );
56 if (
$ret ===
false && !$this->
hasKey( $key ) ) {
57 $ret = $this->backend->get( $key, $flags );
63 public function set( $key,
$value, $exptime = 0, $flags = 0 ) {
64 parent::set( $key,
$value, $exptime, $flags );
65 if ( !( $flags & self::WRITE_CACHE_ONLY ) ) {
66 $this->backend->set( $key,
$value, $exptime, $flags & ~self::WRITE_CACHE_ONLY );
71 public function delete( $key, $flags = 0 ) {
72 parent::delete( $key, $flags );
73 if ( !( $flags & self::WRITE_CACHE_ONLY ) ) {
74 $this->backend->delete( $key );
81 parent::setDebug( $bool );
82 $this->backend->setDebug( $bool );
86 parent::deleteObjectsExpiringBefore( $date, $progressCallback );
87 return $this->backend->deleteObjectsExpiringBefore( $date, $progressCallback );
91 return $this->backend->makeKeyInternal( ...func_get_args() );
94 public function makeKey( $class, $component =
null ) {
95 return $this->backend->makeKey( ...func_get_args() );
99 return $this->backend->makeGlobalKey( ...func_get_args() );
105 public function add( $key,
$value, $exptime = 0, $flags = 0 ) {
106 if ( $this->
get( $key ) ===
false ) {
107 return $this->
set( $key,
$value, $exptime, $flags );
114 $n = $this->backend->incr( $key,
$value );
115 parent::delete( $key );
120 public function lock( $key, $timeout = 6, $expiry = 6, $rclass =
'' ) {
121 return $this->backend->lock( $key, $timeout, $expiry, $rclass );
125 return $this->backend->unlock( $key );
129 return $this->backend->getLastError();
133 return $this->backend->clearLastError();