class CacheItem implements CacheItemInterface

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
getPreviousTags()

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

at line line 36
getKey()

{@inheritdoc}

at line line 44
get()

{@inheritdoc}

at line line 52
isHit()

{@inheritdoc}

at line line 60
set($value)

{@inheritdoc}

Parameters

$value

at line line 70
expiresAt($expiration)

{@inheritdoc}

Parameters

$expiration

at line line 86
expiresAfter($time)

{@inheritdoc}

Parameters

$time

at line line 110
CacheItem tag(string|string[] $tags)

Adds a tag to a cache item.

Parameters

string|string[] $tags A tag or array of tags

Return Value

CacheItem

Exceptions

InvalidArgumentException When $tag is not valid

at line line 139
array getPreviousTags()

Returns the list of tags bound to the value coming from the pool storage if any.

Return Value

array

at line line 153
static string validateKey(string $key)

Validates a cache key according to PSR-6.

Parameters

string $key The key to validate

Return Value

string

Exceptions

InvalidArgumentException When $key is not valid

at line line 173
static log(LoggerInterface $logger = null, $message, $context = array())

Internal logging helper.

Parameters

LoggerInterface $logger
$message
$context