friends_clear_friend_object_cache( int $friendship_id )

Clear friends-related cache for members of a specific friendship.

Parameters Parameters


(int) (Required) ID of the friendship whose two members should have their friends cache busted.

Top ↑

Return Return


Source 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' );

Top ↑

Changelog Changelog

Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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