31 parent::__construct( $params );
33 $this->attrMap[self::ATTR_DURABILITY] = self::QOS_DURABILITY_NONE;
36 protected function doGet( $key, $flags = 0, &$casToken =
null ) {
42 protected function doSet( $key, $value, $exptime = 0, $flags = 0 ) {
46 protected function doDelete( $key, $flags = 0 ) {
50 protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) {
54 public function incr( $key, $value = 1, $flags = 0 ) {
58 public function decr( $key, $value = 1, $flags = 0 ) {
62 public function incrWithInit( $key, $exptime, $value = 1, $init =
null, $flags = 0 ) {
66 public function merge( $key, callable $callback, $exptime = 0, $attempts = 10, $flags = 0 ) {
genericKeyFromComponents(... $components)
At a minimum, there must be a keyspace and collection name component.
string $keyspace
Default keyspace; used by makeKey()
A BagOStuff object with no objects in it.
incr( $key, $value=1, $flags=0)
Increase stored value of $key by $value while preserving its TTL.
makeKeyInternal( $keyspace, $components)
Make a cache key for the given keyspace and components.
doGet( $key, $flags=0, &$casToken=null)
decr( $key, $value=1, $flags=0)
Decrease stored value of $key by $value while preserving its TTL.
doSet( $key, $value, $exptime=0, $flags=0)
Set an item.
doDelete( $key, $flags=0)
Delete an item.
__construct(array $params=[])
convertGenericKey( $key)
Convert a "generic" reversible cache key into one for this cache.
merge( $key, callable $callback, $exptime=0, $attempts=10, $flags=0)
Merge changes into the existing cache value (possibly creating a new one)
doAdd( $key, $value, $exptime=0, $flags=0)
Insert an item if it does not already exist.
incrWithInit( $key, $exptime, $value=1, $init=null, $flags=0)
Increase the value of the given key (no TTL change) if it exists or create it otherwise.
Storage medium specific cache for storing items (e.g.