WP_Object_Cache::delete_multiple()publicWP 6.0.0

Deletes multiple values from the cache in one call.

Method of the class: WP_Object_Cache{}

No Hooks.


true|false[]. Array of return values, grouped by key. Each value is either true on success, or false if the contents were not deleted.


$WP_Object_Cache = new WP_Object_Cache();
$WP_Object_Cache->delete_multiple( $keys, $group );
$keys(array) (required)
Array of keys to be deleted.
Where the cache contents are grouped.
Default: ''


Since 6.0.0 Introduced.

WP_Object_Cache::delete_multiple() code WP 6.5.3

public function delete_multiple( array $keys, $group = '' ) {
	$values = array();

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

	return $values;