final class TypedItem implements CacheItemInterface (View source)

A cache item.

This class will be used by MemoryCacheItemPool and SysVCacheItemPool on PHP 8.0 and above. It is compatible with psr/cache 3.0 (PSR-6).

Methods

__construct(string $key)

No description

string
getKey()

{@inheritdoc}

mixed
get()

{@inheritdoc}

bool
isHit()

{@inheritdoc}

set(mixed $value)

{@inheritdoc}

expiresAt($expiration)

{@inheritdoc}

expiresAfter($time)

{@inheritdoc}

currentTime()

No description

Details

__construct(string $key)

No description

Parameters

string $key

string getKey()

{@inheritdoc}

Return Value

string

mixed get()

{@inheritdoc}

Return Value

mixed

bool isHit()

{@inheritdoc}

Return Value

bool

TypedItem set(mixed $value)

{@inheritdoc}

Parameters

mixed $value

Return Value

TypedItem

TypedItem expiresAt($expiration)

{@inheritdoc}

Parameters

$expiration

Return Value

TypedItem

TypedItem expiresAfter($time)

{@inheritdoc}

Parameters

$time

Return Value

TypedItem

protected DateTime currentTime()

No description

Return Value

DateTime