Skip to:
Content

bbPress.org

Changeset 5733


Ignore:
Timestamp:
05/12/2015 10:35:52 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Core: Force-clear post caches on several common moderation actions.

Fixes inconsistencies around cached objects related to counts, which are currently stored in metadata.

Props thebrandonallen, netweb. See #2801.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/actions.php

    r5663 r5733  
    286286add_action( 'bbp_user_edit_after', 'bbp_user_edit_after' );
    287287
    288 // Caches
     288// New forum/topic/reply caches
     289// @todo Investigate why clearing is necessary on both pre & post hooks
    289290add_action( 'bbp_new_forum_pre_extras',  'bbp_clean_post_cache' );
    290291add_action( 'bbp_new_forum_post_extras', 'bbp_clean_post_cache' );
     
    293294add_action( 'bbp_new_reply_pre_extras',  'bbp_clean_post_cache' );
    294295add_action( 'bbp_new_reply_post_extras', 'bbp_clean_post_cache' );
     296
     297// Clean caches on deleted/spammed/unspammed/trashed/untrashed actions
     298add_action( 'bbp_approved_reply',   'bbp_clean_post_cache', 999 );
     299add_action( 'bbp_approved_topic',   'bbp_clean_post_cache', 999 );
     300add_action( 'bbp_deleted_reply',    'bbp_clean_post_cache', 999 );
     301add_action( 'bbp_deleted_topic',    'bbp_clean_post_cache', 999 );
     302add_action( 'bbp_spammed_reply',    'bbp_clean_post_cache', 999 );
     303add_action( 'bbp_spammed_topic',    'bbp_clean_post_cache', 999 );
     304add_action( 'bbp_trashed_reply',    'bbp_clean_post_cache', 999 );
     305add_action( 'bbp_trashed_topic',    'bbp_clean_post_cache', 999 );
     306add_action( 'bbp_unapproved_reply', 'bbp_clean_post_cache', 999 );
     307add_action( 'bbp_unapproved_topic', 'bbp_clean_post_cache', 999 );
     308add_action( 'bbp_unspammed_reply',  'bbp_clean_post_cache', 999 );
     309add_action( 'bbp_unspammed_topic',  'bbp_clean_post_cache', 999 );
     310add_action( 'bbp_untrashed_reply',  'bbp_clean_post_cache', 999 );
     311add_action( 'bbp_untrashed_topic',  'bbp_clean_post_cache', 999 );
    295312
    296313/**
Note: See TracChangeset for help on using the changeset viewer.