On this page
wp_cache_add_multiple( array $data, string $group = '', int $expire ): bool[]
Adds 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 if cache key and group already exist.
Source
File: wp-includes/cache.php. View all references
function wp_cache_add_multiple( array $data, $group = '', $expire = 0 ) {
global $wp_object_cache;
return $wp_object_cache->add_multiple( $data, $group, $expire );
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Object_Cache::add_multiple() wp-includes/class-wp-object-cache.php | Adds multiple values to the cache in one call. |
Used By
| Used By | Description |
|---|---|
| update_network_cache() wp-includes/ms-network.php | Updates the network cache of given networks. |
| update_site_cache() wp-includes/ms-site.php | Updates sites in cache. |
| update_object_term_cache() wp-includes/taxonomy.php | Updates the cache for the given term object ID(s). |
| update_term_cache() wp-includes/taxonomy.php | Updates terms in cache. |
| update_post_cache() wp-includes/post.php | Updates posts in cache. |
| update_comment_cache() wp-includes/comment.php | Updates the comment cache of given comments. |
| update_meta_cache() wp-includes/meta.php | Updates the metadata cache for the specified objects. |
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_add_multiple