* @suppress PhanTypeNonVarPassByRef
*/
protected function doGet( $key, $flags = 0, &$casToken = null ) {
- $this->debugLog( "get($key)" );
+ $this->debug( "get($key)" );
if ( defined( Memcached::class . '::GET_EXTENDED' ) ) { // v3.0.0
$flags = Memcached::GET_EXTENDED;
$res = $this->client->get( $this->validateKeyEncoding( $key ), null, $flags );
}
public function set( $key, $value, $exptime = 0, $flags = 0 ) {
- $this->debugLog( "set($key)" );
+ $this->debug( "set($key)" );
$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
}
protected function cas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) {
- $this->debugLog( "cas($key)" );
+ $this->debug( "cas($key)" );
return $this->checkResult( $key, parent::cas( $casToken, $key, $value, $exptime, $flags ) );
}
public function delete( $key, $flags = 0 ) {
- $this->debugLog( "delete($key)" );
+ $this->debug( "delete($key)" );
$result = parent::delete( $key );
if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTFOUND ) {
// "Not found" is counted as success in our interface
}
public function add( $key, $value, $exptime = 0, $flags = 0 ) {
- $this->debugLog( "add($key)" );
+ $this->debug( "add($key)" );
return $this->checkResult( $key, parent::add( $key, $value, $exptime ) );
}
public function incr( $key, $value = 1 ) {
- $this->debugLog( "incr($key)" );
+ $this->debug( "incr($key)" );
$result = $this->client->increment( $key, $value );
return $this->checkResult( $key, $result );
}
public function decr( $key, $value = 1 ) {
- $this->debugLog( "decr($key)" );
+ $this->debug( "decr($key)" );
$result = $this->client->decrement( $key, $value );
return $this->checkResult( $key, $result );
}
case Memcached::RES_DATA_EXISTS:
case Memcached::RES_NOTSTORED:
case Memcached::RES_NOTFOUND:
- $this->debugLog( "result: " . $this->client->getResultMessage() );
+ $this->debug( "result: " . $this->client->getResultMessage() );
break;
default:
$msg = $this->client->getResultMessage();
}
public function getMulti( array $keys, $flags = 0 ) {
- $this->debugLog( 'getMulti(' . implode( ', ', $keys ) . ')' );
+ $this->debug( 'getMulti(' . implode( ', ', $keys ) . ')' );
foreach ( $keys as $key ) {
$this->validateKeyEncoding( $key );
}
}
public function setMulti( array $data, $exptime = 0, $flags = 0 ) {
- $this->debugLog( 'setMulti(' . implode( ', ', array_keys( $data ) ) . ')' );
+ $this->debug( 'setMulti(' . implode( ', ', array_keys( $data ) ) . ')' );
foreach ( array_keys( $data ) as $key ) {
$this->validateKeyEncoding( $key );
}
}
public function changeTTL( $key, $expiry = 0, $flags = 0 ) {
- $this->debugLog( "touch($key)" );
+ $this->debug( "touch($key)" );
$result = $this->client->touch( $key, $expiry );
return $this->checkResult( $key, $result );
}