Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groups: Clear BP_Groups_Group::get cache when member removed. #171

Closed

Conversation

iandunn
Copy link

@iandunn iandunn commented Oct 5, 2023

The groups_remove_member action triggers groups_clear_group_user_object_cache(), but that doesn't clear the cache set in BP_Groups_Group::get().

An extra action was added to reset the bp_groups cache incrementor when a member is removed.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/9000

iandunn and others added 2 commits October 5, 2023 13:24
The `groups_remove_member` action triggers `groups_clear_group_user_object_cache(),` but that doesn't clear the cache set in `BP_Groups_Group::get()`.
dcavins pushed a commit to dcavins/buddypress-wp-svn that referenced this pull request Oct 31, 2023
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 buddypress/buddypress#171



git-svn-id: http://buddypress.svn.wordpress.org/trunk@13592 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants