Documentation

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

delete()  : bool
flush()  : bool
get()  : mixed
set()  : bool

Methods

delete()

public static delete(string $key[, string $group = '' ]) : bool
Parameters
$key : string
$group : string = ''
Return values
bool

get()

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

Return values
bool
On this page

Search results