WP_Object_Cache::get_multiple( array $keys, string $group = 'default', bool $force = false ): array
- Since
- 5.5.0
- Source
wp-includes/class-wp-object-cache.php:402
Retrieves multiple values from the cache in one call.
Parameters
$keysarray- Array of keys under which the cache contents are stored.
$groupstringoptional- Where the cache contents are grouped. Default 'default'.Default:
'default' $forcebooloptional- Whether to force an update of the local cache from the persistent cache. Default false.Default:
false
Return
array- Array of return values, grouped by key. Each value is either the cache contents on success, or false on failure.
Uses · 1
- WP_Object_Cache::get()Retrieves the cache contents, if it exists.
Source
public function get_multiple( $keys, $group = 'default', $force = false ) { $values = array(); foreach ( $keys as $key ) { $values[ $key ] = $this->get( $key, $group, $force ); } return $values; }History
Introduced in 5.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 tag, from
src/wp-includes/class-wp-object-cache.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.