UpdateTimestampCache
extends DefaultRegion
in package
implements
TimestampRegion
Tracks the timestamps of the most recent updates to particular keys.
Interfaces, Classes, Traits and Enums
- TimestampRegion
- Defines the contract for a cache region which will specifically be used to store entity "update timestamps".
Table of Contents
- REGION_KEY_SEPARATOR = '_'
- $cache : Cache
- $lifetime : int
- $name : string
- __construct() : mixed
- contains() : bool
- Determine whether this region contains data for the given key.
- evict() : bool
- Remove an item from the cache.
- evictAll() : bool
- Remove all contents of this particular cache region.
- get() : CacheEntry|null
- Get an item from the cache.
- getCache() : CacheProvider
- getMultiple() : mixed
- {@inheritdoc}
- getName() : string
- Retrieve the name of this region.
- put() : bool
- Put an item into the cache.
- update() : mixed
- Update an specific key into the cache region.
- getCacheEntryKey() : string
Constants
REGION_KEY_SEPARATOR
public
mixed
REGION_KEY_SEPARATOR
= '_'
Properties
$cache
protected
Cache
$cache
$lifetime
protected
int
$lifetime
= 0
$name
protected
string
$name
Methods
__construct()
public
__construct(string $name, Cache $cache, int $lifetime) : mixed
Parameters
- $name : string
- $cache : Cache
- $lifetime : int
Return values
mixed —contains()
Determine whether this region contains data for the given key.
public
contains(CacheKey $key) : bool
Parameters
- $key : CacheKey
-
The cache key
Return values
bool —TRUE if the underlying cache contains corresponding data; FALSE otherwise.
evict()
Remove an item from the cache.
public
evict(CacheKey $key) : bool
Parameters
- $key : CacheKey
-
The key under which to cache the item.
Return values
bool —evictAll()
Remove all contents of this particular cache region.
public
evictAll() : bool
Return values
bool —get()
Get an item from the cache.
public
get(CacheKey $key) : CacheEntry|null
Parameters
- $key : CacheKey
-
The key of the item to be retrieved.
Return values
CacheEntry|null —The cached entry or NULL
getCache()
public
getCache() : CacheProvider
Return values
CacheProvider —getMultiple()
{@inheritdoc}
public
getMultiple(CollectionCacheEntry $collection) : mixed
Parameters
- $collection : CollectionCacheEntry
Return values
mixed —getName()
Retrieve the name of this region.
public
getName() : string
Return values
string —The region name
put()
Put an item into the cache.
public
put(CacheKey $key, CacheEntry $entry[, Lock|null $lock = null ]) : bool
Parameters
- $key : CacheKey
-
The key under which to cache the item.
- $entry : CacheEntry
-
The entry to cache.
- $lock : Lock|null = null
-
The lock previously obtained.
Return values
bool —update()
Update an specific key into the cache region.
public
update(CacheKey $key) : mixed
Parameters
- $key : CacheKey
-
The key of the item to update the timestamp.
Return values
mixed —getCacheEntryKey()
protected
getCacheEntryKey(CacheKey $key) : string
Parameters
- $key : CacheKey