Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/11/2023 02:09:00 AM (3 years ago)
Author:
imath
Message:

Clear the Groups cache incrementor after a group member removal

Do reset the Groups cache incrementor once the 'groups_member_after_remove' action is fired. Although in most configs this extra action is not needed, adding it makes sure the corresponding cached results is cleared when using the Memcached plugin.

Props iandunn

Fixes #9000
Closes https://github.com/buddypress/buddypress/pull/171

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-cache.php

    r13309 r13592  
    326326    return bp_core_reset_incrementor( 'bp_groups' );
    327327}
    328 add_action( 'groups_group_after_save', 'bp_groups_reset_cache_incrementor' );
    329 add_action( 'bp_groups_delete_group',  'bp_groups_reset_cache_incrementor' );
    330 add_action( 'updated_group_meta',      'bp_groups_reset_cache_incrementor' );
    331 add_action( 'deleted_group_meta',      'bp_groups_reset_cache_incrementor' );
    332 add_action( 'added_group_meta',        'bp_groups_reset_cache_incrementor' );
     328add_action( 'groups_group_after_save',    'bp_groups_reset_cache_incrementor' );
     329add_action( 'bp_groups_delete_group',     'bp_groups_reset_cache_incrementor' );
     330add_action( 'updated_group_meta',         'bp_groups_reset_cache_incrementor' );
     331add_action( 'deleted_group_meta',         'bp_groups_reset_cache_incrementor' );
     332add_action( 'added_group_meta',           'bp_groups_reset_cache_incrementor' );
     333add_action( 'groups_member_after_remove', 'bp_groups_reset_cache_incrementor' );
    333334
    334335/**
Note: See TracChangeset for help on using the changeset viewer.