wp_cache_delete

Removes the cache contents matching key and group.

Description

wp_cache_delete( (int|string) $id, (string) $flag = '' ); 

Parameters (2)

0. $id (int|string)
What the contents in the cache are called
1. $flag — Optional. (string) => ''
Where the cache contents are grouped

Usage

  1. if ( !function_exists( 'wp_cache_delete' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/backpress/functions.wp-object-cache.php'; 
  3.  
  4. // What the contents in the cache are called 
  5. $id = null; 
  6.  
  7. // Where the cache contents are grouped 
  8. $flag = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wp_cache_delete($id, $flag); 
  12.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/bbpress/bb-includes/backpress/functions.wp-object-cache.php  
  1. function wp_cache_delete($id, $flag = '') { 
  2. global $wp_object_cache; 
  3.  
  4. return $wp_object_cache->delete($id, $flag);