PdbRedisCache
extends PdbCache
in package
implements
ConfigurableInitInterface
A cache backed by redis.
The connection config is provided by PdbConfig.
Table of Contents
Interfaces
- ConfigurableInitInterface
- This extends the `Configurable` interface to include an `init()` method to perform initialization of properties.
Properties
Methods
- __construct() : void
- Create this cache.
- clear() : void
- Remove this cache item.
- get() : mixed|null
- has() : bool
- init() : void
- Initialize the object.
- store() : void
- update() : void
- Update the object with a new configuration.
Properties
$config
public
array<string|int, mixed>
$config
= []
$rdb
public
Rdb
$rdb
$_init
protected
bool
$_init
= true
Methods
__construct()
Create this cache.
public
__construct([array<string|int, mixed> $config = [] ]) : void
Parameters
- $config : array<string|int, mixed> = []
-
array config for rdb RdbConfig
clear()
Remove this cache item.
public
clear([string|null $key = null ]) : void
Parameters
- $key : string|null = null
Tags
get()
public
get(string $key) : mixed|null
Parameters
- $key : string
Tags
Return values
mixed|nullhas()
public
has(string $key) : bool
Parameters
- $key : string
Tags
Return values
boolinit()
Initialize the object.
public
init() : void
Tags
store()
public
store(string $key, mixed $result, float $ttl) : void
Parameters
- $key : string
- $result : mixed
- $ttl : float
Tags
update()
Update the object with a new configuration.
public
update(iterable<string|int, mixed> $config) : void
Parameters
- $config : iterable<string|int, mixed>