ArrayStorage
class ArrayStorage extends AbstractCacheStorage (View source)
Runtime Storage.
Methods
Removes multiple items from the pool.
Confirms if the cache contains specified cache item.
Method to determine whether a storage entry has been set for a key.
Method to set property options
Sets a cache item to be persisted later.
Here we pass in a cache key to be fetched from the cache.
Persisting our data in the cache, uniquely referenced by a key with an optional expiration TTL time.
Remove an item from the cache by its unique key
This will wipe out the entire cache's keys
Method to get property Data
Method to set property data
Details
in AbstractCacheStorage at line line 59
__construct(int $ttl = null, mixed $options = array())
Constructor.
in AbstractCacheStorage at line line 74
Traversable
getItems(array $keys = array())
getItems
in AbstractCacheStorage at line line 93
AbstractCacheStorage
deleteItems(array $keys)
Removes multiple items from the pool.
in AbstractCacheStorage at line line 120
bool
hasItem(string $key)
Confirms if the cache contains specified cache item.
Note: This method MAY avoid retrieving the cached value for performance reasons. This could result in a race condition with CacheItemInterface::get(). To avoid such situation use CacheItemInterface::isHit() instead.
at line line 34
bool
exists(string $key)
Method to determine whether a storage entry has been set for a key.
in AbstractCacheStorage at line line 149
array
getOptions()
Method to get property Options
in AbstractCacheStorage at line line 161
AbstractCacheStorage
setOptions(array $options)
Method to set property options
in AbstractCacheStorage at line line 177
bool
saveDeferred(CacheItemInterface $item)
Sets a cache item to be persisted later.
in AbstractCacheStorage at line line 195
bool
commit()
Persists any deferred cache items.
at line line 47
CacheItemInterface
getItem(string $key)
Here we pass in a cache key to be fetched from the cache.
A CacheItem object will be constructed and returned to us
at line line 72
ArrayStorage
save(CacheItemInterface $item, int|DateInterval|DateTime $ttl = null)
Persisting our data in the cache, uniquely referenced by a key with an optional expiration TTL time.
at line line 89
ArrayStorage
deleteItem(string $key)
Remove an item from the cache by its unique key
at line line 104
ArrayStorage
clear()
This will wipe out the entire cache's keys
at line line 116
array
getData()
Method to get property Data
at line line 128
ArrayStorage
setData(array $data)
Method to set property data