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
get($key, $default = null)

{@inheritdoc}

public
has($key)

{@inheritdoc}

public
delete($key)

{@inheritdoc}

public
set($key, $value, $ttl = null)

{@inheritdoc}

public
setMultiple($items, $ttl = null)

{@inheritdoc}

public
getMultiple($keys, $default = null)

{@inheritdoc}

public
clear()

{@inheritdoc}

public
deleteMultiple($keys)

{@inheritdoc}

public
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

get($key, $default = null)

{@inheritdoc}

Parameters

$key
$default

has($key)

{@inheritdoc}

Parameters

$key

delete($key)

{@inheritdoc}

Parameters

$key

set($key, $value, $ttl = null)

{@inheritdoc}

Parameters

$key
$value
$ttl

setMultiple($items, $ttl = null)

{@inheritdoc}

Parameters

$items
$ttl

getMultiple($keys, $default = null)

{@inheritdoc}

Parameters

$keys
$default

clear()

{@inheritdoc}

deleteMultiple($keys)

{@inheritdoc}

Parameters

$keys

prune()

{@inheritdoc}

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