WP_Object_Cache::delete_multiple( array $keys, string $group =  ): bool[]

In this article

Deletes multiple values from the cache in one call.

Parameters

$keysarrayrequired
Array of keys to be deleted.
$groupstringoptional
Where the cache contents are grouped.

Default:''

Return

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

Source

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

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

	return $values;
}

Changelog

VersionDescription
6.0.0Introduced.

User Contributed Notes

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