Methods |
public
static
|
asOfNow(int|null $now = null): CacheInterface
Get a copy of the store where items do not expire over time (see {@see CacheInterface::asOfNow()})
Get a copy of the store where items do not expire over time (see {@see CacheInterface::asOfNow()})
|
#
|
public
static
|
clear(): true
Delete all items (see {@see CacheInterface::clear()})
Delete all items (see {@see CacheInterface::clear()})
|
#
|
public
static
|
close(): void
Close the store and any underlying resources (see {@see CacheInterface::close()})
Close the store and any underlying resources (see {@see CacheInterface::close()})
|
#
|
public
static
|
delete(string $key): true
Delete an item stored under a given key (see {@see CacheInterface::delete()})
Delete an item stored under a given key (see {@see CacheInterface::delete()})
|
#
|
public
static
|
deleteMultiple(iterable<string> $keys): true
Delete items stored under the given keys (see {@see CacheInterface::deleteMultiple()})
Delete items stored under the given keys (see {@see CacheInterface::deleteMultiple()})
|
#
|
public
static
|
get(string $key, mixed $default = null): mixed
Retrieve an item stored under a given key (see {@see CacheInterface::get()})
Retrieve an item stored under a given key (see {@see CacheInterface::get()})
|
#
|
public
static
|
getArray(string $key, mixed[]|null $default = null): mixed[]|null
Retrieve an array stored under a given key (see {@see CacheInterface::getArray()})
Retrieve an array stored under a given key (see {@see CacheInterface::getArray()})
|
#
|
public
static
|
getInstanceOf(string $key, class-string $class, object|null $default = null): object|null
Retrieve an instance of a class stored under a given key (see {@see CacheInterface::getInstanceOf()})
Retrieve an instance of a class stored under a given key (see {@see CacheInterface::getInstanceOf()})
|
#
|
public
static
|
getInt(string $key, int|null $default = null): int|null
Retrieve an integer stored under a given key (see {@see CacheInterface::getInt()})
Retrieve an integer stored under a given key (see {@see CacheInterface::getInt()})
|
#
|
public
static
|
getItemCount(): int
Get the number of unexpired items in the store
Get the number of unexpired items in the store
|
#
|
public
static
|
getItemKeys(): string[]
Get a list of keys under which unexpired items are stored
Get a list of keys under which unexpired items are stored
|
#
|
public
static
|
getMultiple(iterable<string> $keys, mixed $default = null): iterable<string, mixed>
Retrieve items stored under the given keys (see {@see CacheInterface::getMultiple()})
Retrieve items stored under the given keys (see {@see CacheInterface::getMultiple()})
|
#
|
public
static
|
getString(string $key, string|null $default = null): string|null
Retrieve a string stored under a given key (see {@see CacheInterface::getString()})
Retrieve a string stored under a given key (see {@see CacheInterface::getString()})
|
#
|
public
static
|
has(string $key): bool
Check if an item exists and has not expired (see {@see CacheInterface::has()})
Check if an item exists and has not expired (see {@see CacheInterface::has()})
|
#
|
public
static
|
set(string $key, mixed $value, DateTimeInterface|DateInterval|int|null $ttl = null): true
Store an item under a given key (see {@see CacheInterface::set()})
Store an item under a given key (see {@see CacheInterface::set()})
|
#
|
public
static
|
setMultiple(iterable<string, mixed> $values, DateTimeInterface|DateInterval|int|null $ttl = null): true
Store items under the given keys (see {@see CacheInterface::setMultiple()})
Store items under the given keys (see {@see CacheInterface::setMultiple()})
|
#
|