class Item implements CacheItemInterface (View source)

Properties

protected $key
protected $data
protected $hit
protected $expiration

Methods

__construct($key, $hit = false)

No description

getKey()

{@inheritdoc}

get()

{@inheritdoc}

isHit()

{@inheritdoc}

set($value)

{@inheritdoc}

expiresAt($expiration = null)

{@inheritdoc}

expiresAfter($time)

{@inheritdoc}

mixed
getRaw()

Returns the raw value, regardless of hit status.

int
getTtl()

Get currently (calculated) ttl of cache item

int
getExpiration()

Get expiration time (absolute)

__toString()

No description

Details

__construct($key, $hit = false)

Parameters

$key
$hit

getKey()

{@inheritdoc}

get()

{@inheritdoc}

isHit()

{@inheritdoc}

set($value)

{@inheritdoc}

Parameters

$value

expiresAt($expiration = null)

{@inheritdoc}

Parameters

$expiration

expiresAfter($time)

{@inheritdoc}

Parameters

$time

mixed getRaw()

Returns the raw value, regardless of hit status.

Although not part of the CacheItemInterface, this method is used by the pool for extracting information for saving.

Return Value

mixed

int getTtl()

Get currently (calculated) ttl of cache item

This method is not part of the CacheItemInterface.

Return Value

int

int getExpiration()

Get expiration time (absolute)

This method is not part of the CacheItemInterface.

Return Value

int

__toString()