class PhpArrayAdapter implements AdapterInterface, 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, AdapterInterface $fallbackPool) | ||
| static CacheItemPoolInterface | create(string $file, CacheItemPoolInterface $fallbackPool) This adapter takes advantage of how PHP stores arrays in its latest versions. | |
| CacheItem | getItem($key) {@inheritdoc} | |
| Traversable|CacheItem[] | getItems(array $keys = array()) {@inheritdoc} | |
| hasItem($key) {@inheritdoc} | ||
| deleteItem($key) {@inheritdoc} | ||
| deleteItems(array $keys) {@inheritdoc} | ||
| save(CacheItemInterface $item) {@inheritdoc} | ||
| saveDeferred(CacheItemInterface $item) {@inheritdoc} | ||
| commit() {@inheritdoc} | ||
| static | throwOnRequiredClass($class) |
{@inheritdoc}
{@inheritdoc}
Store an array of cached values.
| array | $values | The cached values |
{@inheritdoc}
| string | $file | The PHP file were values are cached |
| AdapterInterface | $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.
| string | $file | The PHP file were values are cached |
| CacheItemPoolInterface | $fallbackPool | Fallback when opcache is disabled |
| CacheItemPoolInterface |
{@inheritdoc}
| $key |
| CacheItem |
{@inheritdoc}
| array | $keys |
| Traversable|CacheItem[] |
{@inheritdoc}
| $key |
{@inheritdoc}
| $key |
{@inheritdoc}
| array | $keys |
{@inheritdoc}
| CacheItemInterface | $item |
{@inheritdoc}
| CacheItemInterface | $item |
{@inheritdoc}
| $class |
| ReflectionException | When $class is not found and is required |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Cache/Adapter/PhpArrayAdapter.html