bp_groups_clear_user_group_cache_on_other_events( int $user_id, int $group_id )

Clear group memberships cache on miscellaneous actions not covered by the ‘after_save’ hook.

Parameters Parameters


(int) (Required) Current user ID.


(int) (Required) Current group ID.

Source Source

File: bp-groups/bp-groups-cache.php

function bp_groups_clear_user_group_cache_on_other_events( $user_id, $group_id ) {
	wp_cache_delete( $user_id, 'bp_groups_memberships_for_user' );

	$membership = new BP_Groups_Member( $user_id, $group_id );
	wp_cache_delete( $membership->id, 'bp_groups_memberships' );

Top ↑

Changelog Changelog

Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.