WordPress at a glance
function is not described

update_site_cache() WP 4.6.0

Updates sites in cache.

  • Since 5.1.0 Introduced the $update_meta_cache parameter.

No Hooks.

Return

Nothing (null).

Usage

update_site_cache( $sites, $update_meta_cache );
$sites(array) (required)
Array of site objects.
$update_meta_cache(true/false)
Whether to update site meta cache.
Default: true

Code of update site cache: wp-includes/ms-site.php WP 5.2.1

<?php
function update_site_cache( $sites, $update_meta_cache = true ) {
	if ( ! $sites ) {
		return;
	}
	$site_ids = array();
	foreach ( $sites as $site ) {
		$site_ids[] = $site->blog_id;
		wp_cache_add( $site->blog_id, $site, 'sites' );
		wp_cache_add( $site->blog_id . 'short', $site, 'blog-details' );
	}

	if ( $update_meta_cache ) {
		update_sitemeta_cache( $site_ids );
	}
}