bp_core_clear_cache

Prune the WP Super Cache.

Description

(int) bp_core_clear_cache(); 

When WP Super Cache is installed, this function will clear cached pages so that success/error messages or time-sensitive content are not cached.

Returns (int)


Usage

  1. if ( !function_exists( 'bp_core_clear_cache' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-cache.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_core_clear_cache(); 
  7.  

Defined (1)

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

/bp-core/bp-core-cache.php  
  1. function bp_core_clear_cache() { 
  2. global $cache_path; 
  3.  
  4. if ( function_exists( 'prune_super_cache' ) ) { 
  5.  
  6. /** 
  7. * Fires before the pruning of WP Super Cache. 
  8. * @since 1.0.0 
  9. */ 
  10. return prune_super_cache( $cache_path, true );