Changeset 11072 for trunk/src/bp-groups/bp-groups-cache.php
- Timestamp:
- 09/09/2016 03:30:07 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-cache.php
r10819 r11072 253 253 add_action( 'bp_groups_member_before_delete_invite', 'bp_groups_clear_user_group_cache_on_other_events', 10, 2 ); 254 254 add_action( 'groups_accept_invite', 'bp_groups_clear_user_group_cache_on_other_events', 10, 2 ); 255 256 /** 257 * Reset cache incrementor for the Groups component. 258 * 259 * This function invalidates all cached results of group queries, 260 * whenever one of the following events takes place: 261 * - A group is created or updated. 262 * - A group is deleted. 263 * - A group's metadata is modified. 264 * 265 * @since 2.7.0 266 * 267 * @return bool True on success, false on failure. 268 */ 269 function bp_groups_reset_cache_incrementor() { 270 return bp_core_reset_incrementor( 'bp_groups' ); 271 } 272 add_action( 'groups_group_after_save', 'bp_groups_reset_cache_incrementor' ); 273 add_action( 'bp_groups_delete_group', 'bp_groups_reset_cache_incrementor' ); 274 add_action( 'updated_group_meta', 'bp_groups_reset_cache_incrementor' ); 275 add_action( 'deleted_group_meta', 'bp_groups_reset_cache_incrementor' ); 276 add_action( 'added_group_meta', 'bp_groups_reset_cache_incrementor' ); 255 277 256 278 /* List actions to clear super cached pages on, if super cache is installed */
Note: See TracChangeset
for help on using the changeset viewer.