On this page
wp_cache_set_multiple( array $data, string $group = '', int $expire ): bool[]
Sets multiple values to the cache in one call.
Description
See also
Parameters
$dataarray Required-
Array of keys and values to be set.
$groupstring Optional-
Where the cache contents are grouped.
Default:
'' $expireint Optional-
When to expire the cache contents, in seconds.
Default 0 (no expiration).
Return
bool[] Array of return values, grouped by key. Each value is either true on success, or false on failure.
Source
File: wp-includes/cache.php. View all references
function wp_cache_set_multiple( array $data, $group = '', $expire = 0 ) {
global $wp_object_cache;
return $wp_object_cache->set_multiple( $data, $group, $expire );
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Object_Cache::set_multiple() wp-includes/class-wp-object-cache.php | Sets multiple values to the cache in one call. |
Used By
| Used By | Description |
|---|---|
| WP_Comment_Query::fill_descendants() wp-includes/class-wp-comment-query.php | Fetch descendants for located comments. |
| wp_load_core_site_options() wp-includes/option.php | Loads and caches certain often requested site options if is_multisite() and a persistent cache is not being used. |
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_cache_set_multiple