wp_cache_add_multiple()
Adds multiple values to the cache in one call.
No Hooks.
Return
true|false[]
. Array of return values, grouped by key. Each value is either true on success, or false if cache key and group already exist.
Usage
wp_cache_add_multiple( $data, $group, $expire );
- $data(array) (required)
- Array of keys and values to be set.
- $group(string)
- Where the cache contents are grouped.
Default: '' - $expire(int)
- When to expire the cache contents, in seconds.
Default: 0 (no expiration)
Notes
- See: WP_Object_Cache::add_multiple()
- Global. WP_Object_Cache. $wp_object_cache Object cache global instance.
Changelog
Since 6.0.0 | Introduced. |
wp_cache_add_multiple() wp cache add multiple code WP 6.7.2
function wp_cache_add_multiple( array $data, $group = '', $expire = 0 ) { global $wp_object_cache; return $wp_object_cache->add_multiple( $data, $group, $expire ); }