WP_Object_Cache::delete_multiple() WordPress Method
The WP_Object_Cache::delete_multiple() method is used to delete multiple cached objects in a single operation. This is useful for deleting objects that are no longer needed or for clearing the entire cache.
WP_Object_Cache::delete_multiple( array $keys, string $group = '' ) #
Deletes multiple values from the cache in one call.
Parameters
- $keys
(array)(Required)Array of keys to be deleted.
- $group
(string)(Optional) Where the cache contents are grouped.
Default value: ''
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
File: wp-includes/class-wp-object-cache.php
public function delete_multiple( array $keys, $group = '' ) { $values = array(); foreach ( $keys as $key ) { $values[ $key ] = $this->delete( $key, $group ); } return $values; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |