Chain
Less than 1 minute
Chain
The cache backend chaining backend.
This backend allows other caching backends to be chained together for fault tollerance. All operations (has,get,set,remove) are performed on ALL backends at once.
Configuration options for this backend is an array of 'backend_name' => 'backend_options' pairs. (see each backend for available options)
For example:
[ 'file' => [ 'cache_dir' => '/tmp/cache' ], 'memcached' => [ 'server' => 'localhost' ] ]
Properties
backends
private array $backends
order
private array $order
Methods
available
public available(): bool
init
public init(string $namespace): void
Parameters
Parameter | Type | Description |
---|---|---|
$namespace | string |
has
public has(string $key, bool $check_empty = false): bool
Parameters
Parameter | Type | Description |
---|---|---|
$key | string | |
$check_empty | bool |
get
public get(string $key): mixed
Parameters
Parameter | Type | Description |
---|---|---|
$key | string |
set
public set(string $key, mixed $value, int $timeout = 0): bool
Parameters
Parameter | Type | Description |
---|---|---|
$key | string | |
$value | mixed | |
$timeout | int |
remove
public remove(string $key): bool
Parameters
Parameter | Type | Description |
---|---|---|
$key | string |
clear
public clear(): bool
setExpireTimeout
public setExpireTimeout(int $timeout): void
Parameters
Parameter | Type | Description |
---|---|---|
$timeout | int |
toArray
public toArray(): void
count
public count(): int
Generated by Hazaar API Doc Generator