Cache
in package
Table of Contents
- $active : string
- Current active store.
- $duration : int
- Time in minutes to cache the stored values.
- $store : Store
- $stores : array<string|int, mixed>|array<string|int, Store>
- __construct() : mixed
- all() : mixed
- get() : mixed
- getActive() : string
- getStore() : Store
- set() : Cache
- setActive() : Cache
Properties
$active
Current active store.
protected
string
$active
$duration
Time in minutes to cache the stored values.
protected
int
$duration
= 60
$store
protected
Store
$store
$stores
protected
array<string|int, mixed>|array<string|int, Store>
$stores
= []
Methods
__construct()
public
__construct(Store $store) : mixed
Parameters
- $store : Store
Return values
mixed —all()
public
all([string|null $type = null ]) : mixed
Parameters
- $type : string|null = null
Return values
mixed —get()
public
get(int $id[, null $default = null ][, string|null $type = null ]) : mixed
Parameters
- $id : int
- $default : null = null
- $type : string|null = null
Return values
mixed —getActive()
public
getActive() : string
Return values
string —getStore()
public
getStore([string|null $store = null ]) : Store
Parameters
- $store : string|null = null
Return values
Store —set()
public
set(int $id, Item $item[, string|null $type = null ]) : Cache
Parameters
- $id : int
- $item : Item
- $type : string|null = null
Return values
Cache —setActive()
public
setActive(string $type) : Cache
Parameters
- $type : string