CacheItem
class CacheItem implements CacheItemInterface (View source)
Class CacheItem
Methods
string
getKey()
Get the key associated with this CacheItem.
mixed
get()
Obtain the value of this cache item.
boolean
isHit()
This boolean value tells us if our cache item is currently in the cache or not.
getExpiration()
Method to get property Expiration
Details
at line line 67
__construct(string $key, mixed $value = null, DateInterval|int $ttl = null)
Class constructor.
at line line 91
string
getKey()
Get the key associated with this CacheItem.
at line line 103
mixed
get()
Obtain the value of this cache item.
at line line 122
CacheItem
set(mixed $value)
Set the value of the item.
If the value is set, we are assuming that there was a valid hit on the cache for the given key.
at line line 137
boolean
isHit()
This boolean value tells us if our cache item is currently in the cache or not.
at line line 159
CacheItem
expiresAt(DateTimeInterface $expiration)
Sets the expiration time for this cache item.
at line line 196
CacheItem
expiresAfter(int|DateInterval $time)
Sets the expiration time for this cache item.
at line line 230
DateTimeInterface
getExpiration()
Method to get property Expiration