On this page
wp_cache_delete( int|string $key, string $group = '' ): bool
Removes the cache contents matching key and group.
Description
See also
Parameters
$keyint|string Required-
What the contents in the cache are called.
$groupstring Optional-
Where the cache contents are grouped.
Default:
''
Return
bool True on successful removal, false on failure.
Source
File: wp-includes/cache.php. View all references
function wp_cache_delete( $key, $group = '' ) {
global $wp_object_cache;
return $wp_object_cache->delete( $key, $group );
}
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 |
|---|---|
| populate_network_meta() wp-admin/includes/schema.php | Creates WordPress network meta and sets the default values. |
| populate_site_meta() wp-admin/includes/schema.php | Creates WordPress site meta and sets the default values. |
| clean_taxonomy_cache() wp-includes/taxonomy.php | Cleans the caches for a taxonomy. |
| clean_site_details_cache() wp-includes/ms-blogs.php | Cleans the site details cache for a site. |
| delete_network_option() wp-includes/option.php | Removes a network option by name. |
| wp_clean_plugins_cache() wp-admin/includes/plugin.php | Clears the plugins cache used by get_plugins() and by default, the plugin updates cache. |
| update_core() wp-admin/includes/update-core.php | Upgrades the core of WordPress. |
| delete_get_calendar_cache() wp-includes/general-template.php | Purges the cached results of get_calendar. |
| delete_usermeta() wp-includes/deprecated.php | Remove user meta data. |
| update_usermeta() wp-includes/deprecated.php | Update metadata of user. |
| WP_Theme::cache_delete() wp-includes/class-wp-theme.php | Clears the cache for the theme. |
| clean_object_term_cache() wp-includes/taxonomy.php | Removes the taxonomy relationship to terms from the cache. |
| wp_set_object_terms() wp-includes/taxonomy.php | Creates term and taxonomy relationships. |
| wp_remove_object_terms() wp-includes/taxonomy.php | Removes term(s) associated with a given object. |
| delete_site_transient() wp-includes/option.php | Deletes a site transient. |
| delete_option() wp-includes/option.php | Removes option by name. Prevents removal of protected WordPress options. |
| delete_transient() wp-includes/option.php | Deletes a transient. |
| clean_user_cache() wp-includes/user.php | Cleans all user caches. |
| clean_post_cache() wp-includes/post.php | Will clean the post in the cache. |
| clean_attachment_cache() wp-includes/post.php | Will clean the attachment in the cache. |
| _transition_post_status() wp-includes/post.php | Hook for managing future post transitions to published. |
| _wp_upgrade_revisions_of_post() wp-includes/revision.php | Upgrades the revisions author, adds the current post as a revision and sets the revisions version to 1. |
| clean_bookmark_cache() wp-includes/bookmark.php | Deletes the bookmark cache. |
| add_user_to_blog() wp-includes/ms-functions.php | Adds a user to a blog, along with specifying the user’s role. |
| clean_blog_cache() wp-includes/ms-site.php | Clean the blog cache |
| get_blog_details() wp-includes/ms-blogs.php | Retrieve the details for a blog from the blogs table and blog options. |
| wp_update_comment_count_now() wp-includes/comment.php | Updates the comment count for the post. |
| update_metadata_by_mid() wp-includes/meta.php | Updates metadata by meta ID. |
| delete_metadata_by_mid() wp-includes/meta.php | Deletes metadata by meta ID. |
| add_metadata() wp-includes/meta.php | Adds metadata for the specified object. |
| update_metadata() wp-includes/meta.php | Updates metadata for the specified object. If no value already exists for the specified object ID and metadata key, the metadata will be added. |
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_cache_delete