clean_site_details_cache() WordPress Function

The clean_site_details_cache() function is a utility function that clears the site details cache. This function is useful when you need to update the cached data for a site.

clean_site_details_cache( int $site_id ) #

Cleans the site details cache for a site.


Parameters

$site_id

(int)(Optional) Site ID. Default is the current site ID.


Top ↑

Source

File: wp-includes/ms-blogs.php

function clean_site_details_cache( $site_id = 0 ) {
	$site_id = (int) $site_id;
	if ( ! $site_id ) {
		$site_id = get_current_blog_id();
	}

	wp_cache_delete( $site_id, 'site-details' );
	wp_cache_delete( $site_id, 'blog-details' );
}


Top ↑

Changelog

Changelog
VersionDescription
4.7.4Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.