class VersionedCacheAdapter extends ProxyCacheAdapter (View source)

Properties

protected CacheInterface $pool from  ProxyCacheAdapter

Methods

public
__construct(CacheInterface $pool)

Create container cache controlling an inner pool cache

public
array
__sleep()

Do not serialize() $this->pool because it may contain a non-serializable cache.

public
mixed
get(string $key, $default = null)

{@inheritdoc}

public
bool
has(string $key)

{@inheritdoc}

public
bool
delete(string $key)

{@inheritdoc}

public
bool
set(string $key, mixed $value, $ttl = null)

{@inheritdoc}

public
bool
setMultiple(iterable $items, $ttl = null)

{@inheritdoc}

public
iterable
getMultiple(iterable $keys, $default = null)

{@inheritdoc}

public
bool
clear()

{@inheritdoc}

public
bool
deleteMultiple(iterable $keys)

{@inheritdoc}

public
bool
prune()

{@inheritdoc}

public
reset()

{@inheritdoc}

protected
string
getKeyID(string $key)

Ensure keys are segmented based on reading mode

protected
array
getKeyIDs(iterable $keys)

Get key ids

protected
array
iteratorToArray(iterable $keys)

Ensure that a list is cast to an array

Details

__construct(CacheInterface $pool)

Create container cache controlling an inner pool cache

Parameters

CacheInterface $pool

array __sleep()

Do not serialize() $this->pool because it may contain a non-serializable cache.

For instance, Symfony\Component\Cache\Simple\FilesystemCache cannot be serialized because in will throw an exception in Symfony\Component\Cache\Traits\FilesystemCommonTrait::__sleep()

Return Value

array

mixed get(string $key, $default = null)

{@inheritdoc}

Parameters

string $key
$default

Return Value

mixed

bool has(string $key)

{@inheritdoc}

Parameters

string $key

Return Value

bool

bool delete(string $key)

{@inheritdoc}

Parameters

string $key

Return Value

bool

bool set(string $key, mixed $value, $ttl = null)

{@inheritdoc}

Parameters

string $key
mixed $value
$ttl

Return Value

bool

bool setMultiple(iterable $items, $ttl = null)

{@inheritdoc}

Parameters

iterable $items
$ttl

Return Value

bool

iterable getMultiple(iterable $keys, $default = null)

{@inheritdoc}

Parameters

iterable $keys
$default

Return Value

iterable

bool clear()

{@inheritdoc}

Return Value

bool

bool deleteMultiple(iterable $keys)

{@inheritdoc}

Parameters

iterable $keys

Return Value

bool

bool prune()

{@inheritdoc}

Return Value

bool

reset()

{@inheritdoc}

protected string getKeyID(string $key)

Ensure keys are segmented based on reading mode

Parameters

string $key

Return Value

string

protected array getKeyIDs(iterable $keys)

Get key ids

Parameters

iterable $keys

Return Value

array

Array where keys are passed in $keys, and values are key IDs

protected array iteratorToArray(iterable $keys)

Ensure that a list is cast to an array

Parameters

iterable $keys

Return Value

array