WordPress at Your Fingertips
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.

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

null. Nothing.

Usage

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

Notes

Changelog

Since 4.6.0 Introduced.

Code of _prime_network_caches() WP 5.8

<?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)", implode( ',', array_map( 'intval', $non_cached_ids ) ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared

		update_network_cache( $fresh_networks );
	}
}