Item
- Full name:
\Qubus\Cache\Psr6\Item - This class implements:
\Psr\Cache\CacheItemInterface
Constants
| Constant | Visibility | Type | Value |
|---|---|---|---|
EXPIRATION | public | 'now +100 years' |
Properties
expiration
key
value
isHit
Methods
__construct
public __construct(string $key, mixed $value = null, ?\DateTimeInterface $ttl = null, bool $isHit = false): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$key | string | Cache key. |
$value | mixed | Cache value. |
$ttl | ?\DateTimeInterface | |
$isHit | bool |
getKey
{@inheritdoc}
get
{@inheritdoc}
isHit
{@inheritdoc}
set
{@inheritdoc}
Parameters:
| Parameter | Type | Description |
|---|---|---|
$value | mixed |
setHit
Set whether it's a cache hit or not.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$value | bool | False or true. |
expiresAt
{@inheritdoc}
Parameters:
| Parameter | Type | Description |
|---|---|---|
$expiration | ?\DateTimeInterface |
expiresAfter
{@inheritdoc}
Parameters:
| Parameter | Type | Description |
|---|---|---|
$time | int|\DateInterval|null |
getExpiresAt
Returns a DateInterval object.
getExpiresInSeconds
Returns the number of seconds a cache should expire.
isExpired
Returns true if expired, false otherwise.
Automatically generated on 2025-10-13