WordPress at Your Fingertips
function is not described

wp_cache_get_multiple() WP 5.5.0

Retrieves multiple values from the cache in one call.

Compat function to mimic wp_cache_get_multiple().

No Hooks.


Array. Array of values organized into groups.


wp_cache_get_multiple( $keys, $group, $force );
$keys(array) (required)
Array of keys under which the cache contents are stored.
Where the cache contents are grouped.
Default: ''
Whether to force an update of the local cache from the persistent cache.
Default: false



Since 5.5.0 Introduced.

Code of wp_cache_get_multiple() WP 5.8

function wp_cache_get_multiple( $keys, $group = '', $force = false ) {
	$values = array();

	foreach ( $keys as $key ) {
		$values[ $key ] = wp_cache_get( $key, $group, $force );

	return $values;