ArrayCacheItemPool
final class ArrayCacheItemPool implements CacheItemPoolInterface (View source)
Stores PSR-6 cache entries in request-local memory with lazy expiration.
Deferred entries become visible only after commit, and no state survives the pool instance.
Methods
Returns a hit for a live entry or a new miss item while removing expired state.
Returns requested entries keyed by their original cache keys.
Reports whether a live entry exists for the validated key.
Removes all stored and deferred entries from this pool instance.
Removes one stored or deferred entry and succeeds when it is already absent.
Removes each requested entry and succeeds when all keys are valid.
Stores a framework cache item immediately and rejects foreign item implementations.
Queues a framework cache item for a later commit without making it visible yet.
Persists every deferred entry and reports whether all saves succeeded.
Details
getItem
CacheItemInterface
getItem(string $key)
Returns a hit for a live entry or a new miss item while removing expired state.
getItems
iterable
getItems(array $keys = [])
Returns requested entries keyed by their original cache keys.
hasItem
bool
hasItem(string $key)
Reports whether a live entry exists for the validated key.
clear
bool
clear()
Removes all stored and deferred entries from this pool instance.
deleteItem
bool
deleteItem(string $key)
Removes one stored or deferred entry and succeeds when it is already absent.
deleteItems
bool
deleteItems(array $keys)
Removes each requested entry and succeeds when all keys are valid.
save
bool
save(CacheItemInterface $item)
Stores a framework cache item immediately and rejects foreign item implementations.
saveDeferred
bool
saveDeferred(CacheItemInterface $item)
Queues a framework cache item for a later commit without making it visible yet.
commit
bool
commit()
Persists every deferred entry and reports whether all saves succeeded.