/** @var int[] Map of (ATTR_* class constant => QOS_* class constant) */
protected $attrMap = [];
- /** Possible values for getLastError() */
- const ERR_NONE = 0; // no error
- const ERR_NO_RESPONSE = 1; // no response
- const ERR_UNREACHABLE = 2; // can't connect
- const ERR_UNEXPECTED = 3; // response gave some error
-
/** Bitfield constants for get()/getMulti() */
const READ_LATEST = 1; // use latest data for replicated stores
const READ_VERIFIED = 2; // promise that caller can tell when keys are stale
*
* @param string $key
* @return bool True if the item was deleted or not found, false on failure
+ * @param int $flags Bitfield of BagOStuff::WRITE_* constants
*/
- abstract public function delete( $key );
+ abstract public function delete( $key, $flags = 0 );
/**
* Merge changes into the existing cache value (possibly creating a new one)
* The callbacks may or may not be called ever, in any particular order.
* They are likely to be invoked when something WRITE_SYNC is used used.
* They should follow a caching pattern as shown below, so that any code
- * using the word will get it's result no matter what happens.
+ * using the work will get it's result no matter what happens.
* @code
* $result = null;
* $workCallback = function () use ( &$result ) {
$this->busyCallbacks[] = $workCallback;
}
- /**
- * Modify a cache update operation array for EventRelayer::notify()
- *
- * This is used for relayed writes, e.g. for broadcasting a change
- * to multiple data-centers. If the array contains a 'val' field
- * then the command involves setting a key to that value. Note that
- * for simplicity, 'val' is always a simple scalar value. This method
- * is used to possibly serialize the value and add any cache-specific
- * key/values needed for the relayer daemon (e.g. memcached flags).
- *
- * @param array $event
- * @return array
- * @since 1.26
- */
- public function modifySimpleRelayEvent( array $event ) {
- return $event;
- }
-
/**
* @param string $text
*/
$key = $keyspace;
foreach ( $args as $arg ) {
$arg = str_replace( ':', '%3A', $arg );
- $key = $key . ':' . $arg;
+ $key .= ':' . $arg;
}
return strtr( $key, ' ', '_' );
}