Reference › Functions wp_cache_add_multiple ( array $data , string $group = '' , int $expire = 0 ): bool[]
Since 6.0.0
Source wp-includes/cache-compat.php:29Description Parameters Return Uses Used by Source History Adds multiple values to the cache in one call, if the cache keys don't already exist.
Description Compat function to mimic wp_cache_add_multiple().
Parameters
$dataarray Array of keys and values to be added.
$groupstring optional Where the cache contents are grouped. Default empty.Default: ''
$expireint optional When to expire the cache contents, in seconds. Default 0 (no expiration).Default: 0 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. Uses · 1 wp_cache_add() Adds data to the cache, if the cache key doesn't already exist. Source View on Trac ↗ View on GitHub ↗
29 function wp_cache_add_multiple ( array $data , $group = '' , $expire = 0 ) { 30 $values = array ( ) ; 31 32 foreach ( $data as $key => $value ) { 33 $values [ $key ] = wp_cache_add ( $key , $value , $group , $expire ) ; 34 } 35 36 return $values ; 37 } History Introduced in 6.0.0 . Unchanged from 6.7.7 through 7.1.0.
6.7.7 6.8.8 6.9.7 7.0.4 7.1.0 Signature, return type and hooks compared across 5 parsed releases.
About this page Parsed data Generated from the wordpress-develop 6.7.7 tag, from src/wp-includes/cache-compat.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. Corrections Something wrong on this page? Report it and it gets fixed in the next regeneration.