SimpleCache3 implements CacheInterface
This is the default implementation for in-memory cell collection.
Alternatives implementation should leverage off-memory, non-volatile storage to reduce overall memory usage.
Interfaces, Classes and Traits
- CacheInterface
Table of Contents
- $cache : array<string|int, mixed>
- clear() : bool
- delete() : bool
- deleteMultiple() : bool
- get() : mixed
- getMultiple() : iteratable<string|int, mixed>
- has() : bool
- set() : bool
- setMultiple() : bool
Properties
$cache
private
array<string|int, mixed>
$cache
= []
Methods
clear()
public
clear() : bool
Return values
bool —delete()
public
delete(string $key) : bool
Parameters
- $key : string
Return values
bool —deleteMultiple()
public
deleteMultiple(iteratable<string|int, mixed> $keys) : bool
Parameters
- $keys : iteratable<string|int, mixed>
Return values
bool —get()
public
get(string $key[, mixed $default = null ]) : mixed
Parameters
- $key : string
- $default : mixed = null
Return values
mixed —getMultiple()
public
getMultiple(iteratable<string|int, mixed> $keys[, mixed $default = null ]) : iteratable<string|int, mixed>
Parameters
- $keys : iteratable<string|int, mixed>
- $default : mixed = null
Return values
iteratable<string|int, mixed> —has()
public
has(string $key) : bool
Parameters
- $key : string
Return values
bool —set()
public
set(string $key, mixed $value[, null|DateInterval|int $ttl = null ]) : bool
Parameters
- $key : string
- $value : mixed
- $ttl : null|DateInterval|int = null
Return values
bool —setMultiple()
public
setMultiple(iteratable<string|int, mixed> $values[, null|DateInterval|int $ttl = null ]) : bool
Parameters
- $values : iteratable<string|int, mixed>
- $ttl : null|DateInterval|int = null