bp_notifications_clear_all_for_user_cache( int $user_id )

Clear all notifications cache for a given user ID.

Description

Parameters

$user_id

(Required) The user ID's cache to clear.

Source

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

function bp_notifications_clear_all_for_user_cache( $user_id = 0 ) {
	wp_cache_delete( 'all_for_user_' . $user_id, 'bp_notifications' );
	wp_cache_delete( $user_id, 'bp_notifications_unread_count' );
	wp_cache_delete( $user_id, 'bp_notifications_grouped_notifications' );
}

Changelog

Changelog
Version Description
BuddyPress 2.3.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.