An abstract class which has to be extended by instances returned from #getCache
- Author
- Marco Diedrich (mdiedric)
-
Marcus Lunzenauer (mlunz.nosp@m.ena@.nosp@m.uos.d.nosp@m.e)
-
Moritz Strohm stroh.nosp@m.m@da.nosp@m.ta-qu.nosp@m.est..nosp@m.de
- Copyright
- (c) Authors
- Since
- 1.6 GPL2 or any later version
◆ clear()
- See also
- CacheItemPoolInterface::clear
◆ commit()
- See also
- CacheItemPoolInterface::commit
◆ deleteItem()
- See also
- CacheItemPoolInterface::deleteItem
◆ deleteItems()
deleteItems |
( |
array |
$keys | ) |
|
- See also
- CacheItemPoolInterface::deleteItems
◆ expire()
Expire item from the cache.
Example:
expires foo
$cache->expire('foo');
- Parameters
-
◆ flush()
Expire all items from the cache.
◆ getConfig()
Return the Vue component name and props that handle configuration. The associative array is of the form [ 'component' => <Vue component="" name>="">, 'props' => <Properties for="" component>=""> ]
- Returns
- array
◆ getDisplayName()
static getDisplayName |
( |
| ) |
|
|
staticabstract |
- Returns
- string A translateable display name for this cache class.
◆ getExpiration()
getExpiration |
( |
CacheItemInterface |
$item | ) |
|
Calculates the expiration by a cache item. If that cannot be determined, the default expiration period is returned.
- Parameters
-
Item | $item | The item from which to get the expiration time. |
- Returns
- int The time from now until the expiration in seconds.
◆ getItem()
- See also
- CacheItemPoolInterface::getItem
◆ getItems()
getItems |
( |
array |
$keys = [] | ) |
|
- See also
- CacheItemPoolInterface::getItems
◆ getStats()
Get some statistics from cache, like number of entries, hit rate or whatever the underlying cache provides. Results are returned in form of an array like "[ [ 'name' => <displayable name>=""> 'value' =>
] ]"
- Returns
- array
◆ hasItem()
- See also
- CacheItemPoolInterface::hasItem
◆ read()
Retrieve item from the server.
Example:
reads foo
$foo = $cache->reads('foo');
- Parameters
-
- Returns
- mixed the previously stored data if an item with such a key exists on the server or FALSE on failure.
◆ saveDeferred()
saveDeferred |
( |
CacheItemInterface |
$item | ) |
|
- See also
- CacheItemPoolInterface::saveDeferred
◆ write()
write |
( |
|
$name, |
|
|
|
$content, |
|
|
|
$expires = self::DEFAULT_EXPIRATION |
|
) |
| |
Store data at the server.
- Parameters
-
string | $name | the item's key. |
mixed | $content | the item's content (will be serialized if necessary). |
int | $expires | the item's expiry time in seconds. Optional, defaults to 12h. |
- Returns
- bool returns TRUE on success or FALSE on failure.
◆ $deferred_items
array $deferred_items = [] |
|
protected |
◆ DEFAULT_EXPIRATION
const DEFAULT_EXPIRATION = 12 * 60 * 60 |
The documentation for this class was generated from the following file: