bp_activity_clear_cache_for_activity

Clear a cached activity item when that item is updated.

Description

bp_activity_clear_cache_for_activity( (BP_Activity_Activity) $activity ); 

Parameters (1)

0. $activity (BP_Activity_Activity)
Activity object.

Usage

  1. if ( !function_exists( 'bp_activity_clear_cache_for_activity' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-cache.php'; 
  3.  
  4. // Activity object. 
  5. $activity = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_activity_clear_cache_for_activity($activity); 
  9.  

Defined (1)

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

/bp-activity/bp-activity-cache.php  
  1. function bp_activity_clear_cache_for_activity( $activity ) { 
  2. wp_cache_delete( $activity->id, 'bp_activity' ); 
  3. wp_cache_delete( 'bp_activity_sitewide_front', 'bp' );