friends_clear_friend_object_cache( int $friendship_id )
Clear friends-related cache for members of a specific friendship.
Description
Parameters
- $friendship_id
-
(Required) ID of the friendship whose two members should have their friends cache busted.
Return
(bool)
Source
File: bp-friends/bp-friends-cache.php
function friends_clear_friend_object_cache( $friendship_id ) { if ( !$friendship = new BP_Friends_Friendship( $friendship_id ) ) return false; wp_cache_delete( 'friends_friend_ids_' . $friendship->initiator_user_id, 'bp' ); wp_cache_delete( 'friends_friend_ids_' . $friendship->friend_user_id, 'bp' ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.