$this->debugLog( "get($key)" );
if ( defined( Memcached::class . '::GET_EXTENDED' ) ) { // v3.0.0
$flags = Memcached::GET_EXTENDED;
$this->debugLog( "get($key)" );
if ( defined( Memcached::class . '::GET_EXTENDED' ) ) { // v3.0.0
$flags = Memcached::GET_EXTENDED;
public function set( $key, $value, $exptime = 0, $flags = 0 ) {
$this->debugLog( "set($key)" );
public function set( $key, $value, $exptime = 0, $flags = 0 ) {
$this->debugLog( "set($key)" );
- $result = parent::set( $key, $value, $exptime );
+ $result = parent::set( $key, $value, $exptime, $flags = 0 );
if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTSTORED ) {
// "Not stored" is always used as the mcrouter response with AllAsyncRoute
return true;
if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTSTORED ) {
// "Not stored" is always used as the mcrouter response with AllAsyncRoute
return true;
- protected function cas( $casToken, $key, $value, $exptime = 0 ) {
+ protected function cas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) {
- return $this->checkResult( $key, parent::cas( $casToken, $key, $value, $exptime ) );
+ return $this->checkResult( $key, parent::cas( $casToken, $key, $value, $exptime, $flags ) );
$this->debugLog( "delete($key)" );
$result = parent::delete( $key );
if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTFOUND ) {
$this->debugLog( "delete($key)" );
$result = parent::delete( $key );
if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTFOUND ) {
- public function add( $key, $value, $exptime = 0 ) {
+ public function add( $key, $value, $exptime = 0, $flags = 0 ) {
$this->debugLog( "add($key)" );
return $this->checkResult( $key, parent::add( $key, $value, $exptime ) );
}
$this->debugLog( "add($key)" );
return $this->checkResult( $key, parent::add( $key, $value, $exptime ) );
}
$this->debugLog( 'setMulti(' . implode( ', ', array_keys( $data ) ) . ')' );
foreach ( array_keys( $data ) as $key ) {
$this->validateKeyEncoding( $key );
$this->debugLog( 'setMulti(' . implode( ', ', array_keys( $data ) ) . ')' );
foreach ( array_keys( $data ) as $key ) {
$this->validateKeyEncoding( $key );
$this->debugLog( "touch($key)" );
$result = $this->client->touch( $key, $expiry );
return $this->checkResult( $key, $result );
$this->debugLog( "touch($key)" );
$result = $this->client->touch( $key, $expiry );
return $this->checkResult( $key, $result );