On this page
WP_Object_Cache::delete_multiple( array $keys, string $group = '' ): bool[]
Deletes multiple values from the cache in one call.
Parameters
$keysarray Required-
Array of keys to be deleted.
$groupstring Optional-
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
File: wp-includes/class-wp-object-cache.php. View all references
public function delete_multiple( array $keys, $group = '' ) {
$values = array();
foreach ( $keys as $key ) {
$values[ $key ] = $this->delete( $key, $group );
}
return $values;
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Object_Cache::delete() wp-includes/class-wp-object-cache.php | Removes the contents of the cache key in the group. |
Used By
| Used By | Description |
|---|---|
| wp_cache_delete_multiple() wp-includes/cache.php | Deletes multiple values from the cache in one call. |
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_object_cache/delete_multiple