WP_Object_Cache::get_multiple( array $keys, string $group = 'default', bool $force = false )

Retrieves multiple values from the cache in one call.

Parameters Parameters


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


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

Default value: 'default'


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

Default value: false

Top ↑

Return Return

(array) Array of values organized into groups.

Top ↑

Source Source

File: wp-includes/class-wp-object-cache.php

	public function get_multiple( $keys, $group = 'default', $force = false ) {
		$values = array();

		foreach ( $keys as $key ) {
			$values[ $key ] = $this->get( $key, $group, $force );

		return $values;

Top ↑

Changelog Changelog

Version Description
5.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.