WordPress at a glance
function is not described

_prime_site_caches() WP 4.6.0

Adds any sites from the given ids to the cache that do not already exist in cache.

  • See: update_site_cache()
  • Global. wpdb. $wpdb WordPress database abstraction object.

No Hooks.

Return

Nothing (null).

Usage

_prime_site_caches( $ids );
$ids(array) (required)
ID list.

Code of prime site caches: wp-includes/ms-blogs.php VER 5.0.3

<?php
function _prime_site_caches( $ids ) {
	global $wpdb;

	$non_cached_ids = _get_non_cached_ids( $ids, 'sites' );
	if ( ! empty( $non_cached_ids ) ) {
		$fresh_sites = $wpdb->get_results( sprintf( "SELECT * FROM $wpdb->blogs WHERE blog_id IN (%s)", join( ",", array_map( 'intval', $non_cached_ids ) ) ) );

		update_site_cache( $fresh_sites );
	}
}