SimpleCache
- Full name:
\Qubus\Cache\Psr16\SimpleCache
- This class is marked as final and can't be subclassed
- This class implements:
\Psr\SimpleCache\CacheInterface
- This class is a Final class
Constants
Constant | Visibility | Type | Value |
---|---|---|---|
CACHE_FLAG | public | "@psr16_" |
Properties
adapter
ttl
namespace
Methods
__construct
public __construct(\Qubus\Cache\Adapter\CacheAdapter $adapter, int|null|\DateInterval $ttl = null, ?string $namespace = 'default'): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$adapter | \Qubus\Cache\Adapter\CacheAdapter | |
$ttl | int|null|\DateInterval | |
$namespace | ?string |
get
{@inheritdoc}
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$default | mixed |
set
{@inheritdoc}
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string | |
$value | mixed | |
$ttl | null|int|\DateInterval |
delete
{@inheritdoc}
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string |
clear
{@inheritdoc}
getMultiple
{@inheritdoc}
Parameters:
Parameter | Type | Description |
---|---|---|
$keys | iterable | |
$default | mixed |
setMultiple
{@inheritdoc}
Parameters:
Parameter | Type | Description |
---|---|---|
$values | iterable | |
$ttl | null|int|\DateInterval |
deleteMultiple
{@inheritdoc}
Parameters:
Parameter | Type | Description |
---|---|---|
$keys | iterable |
has
{@inheritdoc}
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string |
getTtl
Parameters:
Parameter | Type | Description |
---|---|---|
$ttl | int|null|\DateInterval |
Inherited methods
reservedKeyCharacters
Reserved key characters that should not be used in a cache key.
- This method is final.
validateKey
Validates cache key.
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string |
Throws:
isHashed
Checks if key is hashed.
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string |
prefix
Affixes a prefix to the
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string |
validateKeys
Validates an array of keys.
Parameters:
Parameter | Type | Description |
---|---|---|
$keys | array |
Throws:
Automatically generated on 2025-10-13