WordPress at a glance
function is not described

_prime_network_caches() WP 4.6.0

Adds any networks from the given IDs to the cache that do not already exist in cache.

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

No Hooks.

Return

Nothing (null).

Usage

_prime_network_caches( $network_ids );
$network_ids(array) (required)
Array of network IDs.

Code of prime network caches: wp-includes/ms-network.php WP 5.2.2

<?php
function _prime_network_caches( $network_ids ) {
	global $wpdb;

	$non_cached_ids = _get_non_cached_ids( $network_ids, 'networks' );
	if ( ! empty( $non_cached_ids ) ) {
		$fresh_networks = $wpdb->get_results( sprintf( "SELECT $wpdb->site.* FROM $wpdb->site WHERE id IN (%s)", join( ',', array_map( 'intval', $non_cached_ids ) ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared

		update_network_cache( $fresh_networks );
	}
}