wp_cache_delete( int|string $key, string $group = '' ): bool
- Since
- 2.0.0
- Source
wp-includes/cache.php:190
Removes the cache contents matching key and group.
Parameters
$keyint|string- What the contents in the cache are called.
$groupstringoptional- Where the cache contents are grouped. Default empty.Default:
''
Return
bool- True on successful removal, false on failure.
Used by · 37
- Twenty_Eleven_Ephemera_Widget::flush_widget_cache()Flushes widget cache.
- WP_AI_Client_Cache::delete()Delete an item from the cache by its unique key.
- WP_Textdomain_Registry::invalidate_mo_files_cache()Invalidate the cache for .mo files.
- WP_Theme::cache_delete()Clears the cache for the theme.
- _transition_post_status()Hook for managing future post transitions to published.
- _wp_upgrade_revisions_of_post()Upgrades the revisions author, adds the current post as a revision and sets the revisions version to 1.
- add_metadata()Adds metadata for the specified object.
- add_user_to_blog()Adds a user to a blog, along with specifying the user's role.
- clean_attachment_cache()Will clean the attachment in the cache.
- clean_blog_cache()Clean the blog cache
- clean_bookmark_cache()Deletes the bookmark cache.
- clean_post_cache()Will clean the post in the cache.
Show all 37
- clean_site_details_cache()Cleans the site details cache for a site.
- clean_taxonomy_cache()Cleans the caches for a taxonomy.
- clean_user_cache()Cleans all user caches.
- delete_get_calendar_cache()Purges the cached results of get_calendar.
- delete_metadata_by_mid()Deletes metadata by meta ID.
- delete_network_option()Removes a network option by name.
- delete_option()Removes an option by name. Prevents removal of protected WordPress options.
- delete_site_transient()Deletes a site transient.
- delete_transient()Deletes a transient.
- delete_usermeta()Remove user meta data.
- get_blog_details()Retrieves the details for a blog from the blogs table and blog options.
- populate_network_meta()Creates WordPress network meta and sets the default values.
- populate_site_meta()Creates WordPress site meta and sets the default values.
- update_core()Upgrades the core of WordPress.
- update_metadata()Updates metadata for the specified object. If no value already exists for the specified object ID and metadata key, the metadata will be added.
- update_metadata_by_mid()Updates metadata by meta ID.
- update_option()Updates the value of an option that was already added.
- update_usermeta()Update metadata of user.
- wp_cache_delete_multiple()Deletes multiple values from the cache in one call.
- wp_clean_plugins_cache()Clears the plugins cache used by get_plugins() and by default, the plugin updates cache.
- wp_clean_theme_json_cache()Cleans the caches under the theme_json group.
- wp_remove_object_terms()Removes term(s) associated with a given object.
- wp_set_object_terms()Creates term and taxonomy relationships.
- wp_set_option_autoload_values()Sets the autoload values for multiple options in the database.
- wp_update_comment_count_now()Updates the comment count for the post.
Source
function wp_cache_delete( $key, $group = '' ) { global $wp_object_cache; return $wp_object_cache->delete( $key, $group );}History
Introduced in 2.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, from
src/wp-includes/cache.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.