Skip to:
Content

BuddyPress.org

Ticket #8296: 8296.patch

File 8296.patch, 647 bytes (added by oztaser, 4 years ago)
  • src/bp-activity/bp-activity-cache.php

     
    4747function bp_activity_clear_cache_for_activity( $activity ) {
    4848        wp_cache_delete( $activity->id, 'bp_activity' );
    4949        wp_cache_delete( 'bp_activity_sitewide_front', 'bp' );
     50
     51        if ( 'activity_comment' == $activity->type && $activity->is_spam ) {
     52                wp_cache_delete( $activity->item_id, 'bp_activity_comments' );
     53        }
    5054}
    5155add_action( 'bp_activity_after_save', 'bp_activity_clear_cache_for_activity' );
    5256