XcacheStorage
class XcacheStorage extends AbstractCacheStorage (View source)
Class XcacheStorage
Methods
Constructor.
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
Details
at line line 29
__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 46
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 59
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 84
XcacheStorage
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 98
XcacheStorage
deleteItem(string $key)
Remove an item from the cache by its unique key
at line line 110
XcacheStorage
clear()
This will wipe out the entire cache's keys