WordPress at a glance

wp_cache_delete() WP 1.0

Removes the cache contents matching key and group.

Is the basis for: clean_post_cache()
Works based on: WP_Object_Cache()

No Hooks.


true/false. True on successful removal, false on failure.


wp_cache_delete( $key, $group );
$key(int/string) (required)
What the contents in the cache are called.
Where the cache contents are grouped.
Default: ''


  • See: WP_Object_Cache::delete()
  • Global. WP_Object_Cache. $wp_object_cache Object cache global instance.


Since 2.0.0 Introduced.

Code of wp cache delete: wp-includes/cache.php WP 5.4.2

function wp_cache_delete( $key, $group = '' ) {
	global $wp_object_cache;

	return $wp_object_cache->delete( $key, $group );

Related Functions

From tag: cache (caching)

No comments
        Log In . Register