CacheSupport
in package
FinalYes
Boundary seam over the WordPress Object Cache API (`wp_cache_*`) — request-scoped by default, persistent when a backend (Redis, Memcached) is dropped in. Mirrors the moodle adapter's CacheSupport. No-ops outside a WP runtime.
Table of Contents
Methods
Methods
delete()
public
static delete(string $key[, string $group = '' ]) : bool
Parameters
- $key : string
- $group : string = ''
Return values
boolflush()
public
static flush() : bool
Return values
boolget()
public
static get(string $key[, string $group = '' ][, bool|null &$found = null ]) : mixed
Parameters
- $key : string
- $group : string = ''
- $found : bool|null = null
set()
public
static set(string $key, mixed $value[, string $group = '' ][, int $expirationSeconds = 0 ]) : bool
Parameters
- $key : string
- $value : mixed
- $group : string = ''
- $expirationSeconds : int = 0
-
0 = no expiration