CacheItem
class CacheItem implements ItemInterface
Constants
METADATA_EXPIRY_OFFSET |
|
Properties
protected | $key | ||
protected | $value | ||
protected | $isHit | ||
protected | $expiry | ||
protected | $defaultLifetime | ||
protected | $metadata | ||
protected | $newMetadata | ||
protected | $innerItem | ||
protected | $poolHash | ||
protected | $isTaggable |
Methods
getKey()
{@inheritdoc}
get()
{@inheritdoc}
isHit()
{@inheritdoc}
set($value)
{@inheritdoc}
expiresAt($expiration)
{@inheritdoc}
expiresAfter($time)
{@inheritdoc}
tag(string|string[] $tags)
Adds a tag to a cache item.
array
getMetadata()
Returns a list of metadata info that were saved alongside with the cached value.
array
getPreviousTags()
deprecated
Returns the list of tags bound to the value coming from the pool storage if any.
static string
validateKey(string $key)
Validates a cache key according to PSR-6.
static
log(LoggerInterface $logger = null, $message, $context = array())
Internal logging helper.
Details
ItemInterface
tag(string|string[] $tags)
Adds a tag to a cache item.
Tags are strings that follow the same validation rules as keys.
array
getMetadata()
Returns a list of metadata info that were saved alongside with the cached value.
See ItemInterface::METADATA_* consts for keys potentially found in the returned array.