WP_Object_Cache::delete_multiple()
Deletes multiple values from the cache in one call.
Method of the class: WP_Object_Cache{}
No Hooks.
Return
true|false[]
. Array of return values, grouped by key. Each value is either true on success, or false if the contents were not deleted.
Usage
$WP_Object_Cache = new WP_Object_Cache(); $WP_Object_Cache->delete_multiple( $keys, $group );
- $keys(array) (required)
- Array of keys to be deleted.
- $group(string)
- Where the cache contents are grouped.
Default: ''
Changelog
Since 6.0.0 | Introduced. |
WP_Object_Cache::delete_multiple() WP Object Cache::delete multiple code WP 6.7.1
public function delete_multiple( array $keys, $group = '' ) { $values = array(); foreach ( $keys as $key ) { $values[ $key ] = $this->delete( $key, $group ); } return $values; }