wp_cache_get_multiple()
Retrieves multiple values from the cache in one call.
No Hooks.
Returns
Array. Array of return values, grouped by key. Each value is either the cache contents on success, or false on failure.
Usage
wp_cache_get_multiple( $keys, $group, $force );
- $keys(array) (required)
- Array of keys under which the cache contents are stored.
- $group(string)
- Where the cache contents are grouped.
Default:'' - $force(true|false)
- Whether to force an update of the local cache from the persistent cache.
Default:false
Notes
- See: WP_Object_Cache::get_multiple()
- Global. WP_Object_Cache.
$wp_object_cacheObject cache global instance.
Changelog
| Since 5.5.0 | Introduced. |
wp_cache_get_multiple() wp cache get multiple code WP 6.9.1
function wp_cache_get_multiple( $keys, $group = '', $force = false ) {
global $wp_object_cache;
return $wp_object_cache->get_multiple( $keys, $group, $force );
}