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.

static 
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 35
getKey()

{@inheritdoc}

at line line 43
get()

{@inheritdoc}

at line line 51
isHit()

{@inheritdoc}

at line line 59
set($value)

{@inheritdoc}

Parameters

$value

at line line 69
expiresAt($expiration)

{@inheritdoc}

Parameters

$expiration

at line line 85
expiresAfter($time)

{@inheritdoc}

Parameters

$time

at line line 109
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 140
static validateKey(string $key)

Validates a cache key according to PSR-6.

Parameters

string $key The key to validate

Exceptions

InvalidArgumentException When $key is not valid

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

Internal logging helper.

Parameters

LoggerInterface $logger
$message
$context