开发者 | peterwilsoncc |
---|---|
更新时间 | 2025年6月24日 10:50 |
PHP版本: | 7.2 及以上 |
WordPress版本: | 6.6 |
版权: | MIT |
wp_prime_option_caches()
was introduced to allow for multiple options to be queried in a single database call.
On sites without a persistent cache, temporary transients are stored in two options. One containing the transient itself, the other containing the timeout. These are stored as _transient_[transient name]
and _transient_timeout_[transient name]
.
In WordPress 6.6 and later, these options are primed by a single database call using the priming function. This plugin can be used on WordPress 6.4 and 6.5 to backport the functionality.
While a mild improvement on sites making limited use of transients, this can significantly reduce the number of database queries on sites running plugins making heavy use of transients.
This plugin doesn't include any options to configure so no admin menu is required. Simply install the plugin and activate.