API / Minn\Runtime / Transients

Transients final class

Minn\Runtime\Transients · public/minn/src/Minn/Runtime/Transients.php · 142 lines

Values kept for a while, as WordPress keeps them in options: the site's transients (_transient_{name}, with _transient_timeout_{name} when they expire) and the network's (_site_transient_{name}), each read, set and removed through the filters and actions plugins hook. An expired one reads as false and is removed as it is read.

Public

staticget(mixed $transient): mixed#

A transient's value, or false (get_transient).

staticset(mixed $transient, mixed $value, mixed $expiration = 0): bool#

A transient set (set_transient): one that expires is stored not to autoload, its timeout beside it; setting an expiry on one that had none stores it again that way.

staticdelete(mixed $transient): bool#

A transient removed (delete_transient), its timeout with it.

staticgetSite(mixed $transient): mixed#

A network transient's value, or false (get_site_transient); the update offers never expire by their timeout.

staticsetSite(mixed $transient, mixed $value, mixed $expiration = 0): bool#

A network transient set (set_site_transient), its timeout beside it when it expires.

staticdeleteSite(mixed $transient): bool#

A network transient removed (delete_site_transient), its timeout with it.