final class Item implements CacheItemInterface (View source)

A cache item.

This class will be used by MemoryCacheItemPool and SysVCacheItemPool on PHP 7.4 and below. It is compatible with psr/cache 1.0 and 2.0 (PSR-6).

Methods

__construct(string $key)

No description

getKey()

{@inheritdoc}

get()

{@inheritdoc}

isHit()

{@inheritdoc}

set($value)

{@inheritdoc}

expiresAt($expiration)

{@inheritdoc}

expiresAfter($time)

{@inheritdoc}

currentTime()

No description

Details

__construct(string $key)

No description

Parameters

string $key

getKey()

{@inheritdoc}

get()

{@inheritdoc}

isHit()

{@inheritdoc}

set($value)

{@inheritdoc}

Parameters

$value

expiresAt($expiration)

{@inheritdoc}

Parameters

$expiration

expiresAfter($time)

{@inheritdoc}

Parameters

$time

protected DateTime currentTime()

No description

Return Value

DateTime