Deferrals final class
Minn\Runtime\Deferrals · public/minn/src/Minn/Runtime/Deferrals.php · 66 lines
The switches an importer flips for the length of a request (probe plugin-helpers): term and comment counts deferred until the switch goes off again, when what was put off is counted at once, and cache additions suspended so a bulk read does not fill the cache. Each answers what it is now; a value that is not a boolean asks without changing it. Kept in the request's state, so a worker's next request starts with them off.
Public
| static | terms(mixed $defer): bool# | wp_defer_term_counting: on, off, or asked; off counts what was put off. | |||
| static | comments(mixed $defer): bool# | wp_defer_comment_counting: on, off, or asked; off counts what was put off. | |||
| static | cacheAddition(mixed $suspend): bool# | wp_suspend_cache_addition: on, off, or asked. | |||
| static | putOffTerms(array $terms, string $taxonomy): bool# | Puts terms' recount off while counting is deferred; false when it is not (count now). @param list<int> $terms
| |||
| static | putOffComments(int $post): bool# | Puts a post's comment recount off while counting is deferred; false when it is not (count now). |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | flip(string $key, mixed $value): bool# |
Nothing matches.