OptionsGroup final class
Minn\Runtime\OptionsGroup · public/minn/src/Minn/Runtime/OptionsGroup.php · 57 lines
wp_cache's options group, where option reads are kept as the reference keeps them: the autoloaded list under alloptions, the names a read found unset under notoptions, and one key per option not autoloaded. The engine's own object cache holds it, or an object-cache.php drop-in once the facade hands over its functions.
A drop-in's cache outlives the request, and the engine writes some options behind the store (its own state, the CLI), so a key left by an earlier request is never trusted: each is read from the database the first time a request asks for it, then kept in step for the rest of it.
Constants and properties
| const | GROUP = 'options' | |
| private | static ?array $external | |
| private | array $fresh |
Public
| static | useExternal(Closure $get, Closure $set, Closure $delete): void# | Hands the group to an object-cache.php drop-in's functions. |
| method | get(string $key, ?bool $found = NULL): mixed# | A key's value, found only when this request may trust it. |
| method | set(string $key, mixed $value): void# | Stores a key; a drop-in is written only when it holds something else. |
| method | delete(string $key): void# | Removes a key. |
Nothing matches.