class PhpArrayCache implements CacheInterface, PruneableInterface, ResettableInterface

deprecated since Symfony 4.3, use PhpArrayAdapter and type-hint for CacheInterface instead.

Traits

Methods

prune()

{@inheritdoc}

reset()

{@inheritdoc}

warmUp(array $values)

Store an array of cached values.

clear()

{@inheritdoc}

__construct(string $file, CacheInterface $fallbackPool)

No description

static CacheInterface
create($file, CacheInterface $fallbackPool)

This adapter takes advantage of how PHP stores arrays in its latest versions.

get($key, $default = null)

{@inheritdoc}

getMultiple($keys, $default = null)

{@inheritdoc}

has($key)

{@inheritdoc}

delete($key)

{@inheritdoc}

deleteMultiple($keys)

{@inheritdoc}

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

{@inheritdoc}

setMultiple($values, $ttl = null)

{@inheritdoc}

Details

in ProxyTrait at line 29
prune()

{@inheritdoc}

in ProxyTrait at line 37
reset()

{@inheritdoc}

in PhpArrayTrait at line 37
warmUp(array $values)

Store an array of cached values.

Parameters

array $values The cached values

in PhpArrayTrait at line 125
clear()

{@inheritdoc}

at line 35
__construct(string $file, CacheInterface $fallbackPool)

Parameters

string $file The PHP file were values are cached
CacheInterface $fallbackPool A pool to fallback on when an item is not hit

at line 48
static CacheInterface create($file, CacheInterface $fallbackPool)

This adapter takes advantage of how PHP stores arrays in its latest versions.

Parameters

$file
CacheInterface $fallbackPool

Return Value

CacheInterface

at line 61
get($key, $default = null)

{@inheritdoc}

Parameters

$key
$default

at line 91
getMultiple($keys, $default = null)

{@inheritdoc}

Parameters

$keys
$default

at line 113
has($key)

{@inheritdoc}

Parameters

$key

at line 128
delete($key)

{@inheritdoc}

Parameters

$key

at line 143
deleteMultiple($keys)

{@inheritdoc}

Parameters

$keys

at line 177
set($key, $value, $ttl = null)

{@inheritdoc}

Parameters

$key
$value
$ttl

at line 192
setMultiple($values, $ttl = null)

{@inheritdoc}

Parameters

$values
$ttl