class PhpArrayCache implements CacheInterface, PruneableInterface, ResettableInterface
Caches items at warm up time using a PHP array that is stored in shared memory by OPCache since PHP 7.0.
Warmed up items are read-only and run-time discovered items are cached using a fallback adapter.
PhpArrayTrait | |
ProxyTrait |
prune() {@inheritdoc} | from ProxyTrait | |
reset() {@inheritdoc} | from ProxyTrait | |
warmUp(array $values) Store an array of cached values. | from PhpArrayTrait | |
clear() {@inheritdoc} | from PhpArrayTrait | |
__construct(string $file, CacheInterface $fallbackPool) | ||
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} |
{@inheritdoc}
{@inheritdoc}
Store an array of cached values.
array | $values | The cached values |
{@inheritdoc}
string | $file | The PHP file were values are cached |
CacheInterface | $fallbackPool | A pool to fallback on when an item is not hit |
This adapter takes advantage of how PHP stores arrays in its latest versions.
$file | ||
CacheInterface | $fallbackPool |
CacheInterface |
{@inheritdoc}
$key | ||
$default |
{@inheritdoc}
$keys | ||
$default |
{@inheritdoc}
$key |
{@inheritdoc}
$key |
{@inheritdoc}
$keys |
{@inheritdoc}
$key | ||
$value | ||
$ttl |
{@inheritdoc}
$values | ||
$ttl |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Cache/Simple/PhpArrayCache.html