ChainAdapter
class ChainAdapter implements AdapterInterface, PruneableInterface, ResettableInterface
Цепочечный адаптер.
Кешированные элементы извлекаются из первого адаптера, содержащего их в хранилище данных. Они сохраняются и удаляются сразу во всех адаптерах.
Методы
| __construct(array $adapters, int $defaultLifetime = 0) | ||
| CacheItem | getItem($key) {@inheritdoc} | |
| Traversable|CacheItem[] | getItems(array $keys = array()) {@inheritdoc} | |
| hasItem($key) {@inheritdoc} | ||
| clear() {@inheritdoc} | ||
| deleteItem($key) {@inheritdoc} | ||
| deleteItems(array $keys) {@inheritdoc} | ||
| save(CacheItemInterface $item) {@inheritdoc} | ||
| saveDeferred(CacheItemInterface $item) {@inheritdoc} | ||
| commit() {@inheritdoc} | ||
| bool | prune() | |
| reset() |
Подробности
__construct(array $adapters, int $defaultLifetime = 0)
Параметры
| Массив | $adapters | Отсортированный список адаптеров для извлечения кешированных элементов |
| Целое число | $defaultLifetime | Срок жизни по умолчанию элементов, переданных от нижних адаптеров к верхним |
CacheItem getItem($key)
{@inheritdoc}
Параметры
| $key |
Возвращаемое значение
| CacheItem |
Traversable|CacheItem[] getItems(array $keys = array())
{@inheritdoc}
Параметры
| Массив | $keys |
Возвращаемое значение
| Traversable|CacheItem[] |
hasItem($key)
{@inheritdoc}
Параметры
| $key |
clear()
{@inheritdoc}
deleteItem($key)
{@inheritdoc}
Параметры
| $key |
deleteItems(array $keys)
{@inheritdoc}
Параметры
| Массив | $keys |
save(CacheItemInterface $item)
{@inheritdoc}
Параметры
| CacheItemInterface | $item |
saveDeferred(CacheItemInterface $item)
{@inheritdoc}
Параметры
| CacheItemInterface | $item |
commit()
{@inheritdoc}
bool prune()
Возвращаемое значение
| bool |
reset()
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Cache/Adapter/ChainAdapter.html