wp_cache_get_multiple() WordPress Function

The wp_cache_get_multiple() function is used to fetch multiple values from the WordPress Object Cache. This is a wrapper for the WordPress Object Cache's get_multiple() function. The values retrieved from the cache will be an array of values or an empty array if no values are found.

wp_cache_get_multiple( array $keys, string $group = '', bool $force = false ) #

Retrieves multiple values from the cache in one call.


Description

Top ↑

See also


Top ↑

Parameters

$keys

(array)(Required)Array of keys under which the cache contents are stored.

$group

(string)(Optional) Where the cache contents are grouped.

Default value: ''

$force

(bool)(Optional) Whether to force an update of the local cache from the persistent cache.

Default value: false


Top ↑

Return

(array) Array of return values, grouped by key. Each value is either the cache contents on success, or false on failure.


Top ↑

Source

File: wp-includes/cache.php

function wp_cache_get_multiple( $keys, $group = '', $force = false ) {
	global $wp_object_cache;

	return $wp_object_cache->get_multiple( $keys, $group, $force );
}


Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.