bp_blogs_clear_blog_object_cache( int $blog_id, int $user_id )

Clear the blog object cache.


Parameters Parameters

$blog_id

(int) (Required) ID of the current blog.

$user_id

(int) (Required) ID of the user whose blog cache should be cleared.


Source Source

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

function bp_blogs_clear_blog_object_cache( $blog_id = 0, $user_id = 0 ) {
	if ( ! empty( $user_id ) ) {
		wp_cache_delete( 'bp_blogs_of_user_'        . $user_id, 'bp' );
		wp_cache_delete( 'bp_total_blogs_for_user_' . $user_id, 'bp' );
	}

	wp_cache_delete( 'bp_total_blogs', 'bp' );
}


Top ↑

Changelog 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.