NullCacheItemPool
final class NullCacheItemPool implements CacheItemPoolInterface (View source)
Implements a validating PSR-6 sink where reads always miss and mutations always succeed.
No cache values or deferred operations are retained.
Methods
Returns a new miss item for every valid key.
Returns new miss items keyed by their original cache keys.
Validates the key and always reports that no entry exists.
Succeeds without retaining or removing any state.
Validates one key and succeeds without retaining state.
Validates every key and succeeds without retaining state.
Validates the item key and discards its value.
Validates the item key and discards the deferred operation.
Succeeds because this pool never retains deferred operations.
Details
getItem
CacheItemInterface
getItem(string $key)
Returns a new miss item for every valid key.
getItems
iterable
getItems(array $keys = [])
Returns new miss items keyed by their original cache keys.
hasItem
bool
hasItem(string $key)
Validates the key and always reports that no entry exists.
clear
bool
clear()
Succeeds without retaining or removing any state.
deleteItem
bool
deleteItem(string $key)
Validates one key and succeeds without retaining state.
deleteItems
bool
deleteItems(array $keys)
Validates every key and succeeds without retaining state.
save
bool
save(CacheItemInterface $item)
Validates the item key and discards its value.
saveDeferred
bool
saveDeferred(CacheItemInterface $item)
Validates the item key and discards the deferred operation.
commit
bool
commit()
Succeeds because this pool never retains deferred operations.