wordpress / latest / functions / update_network_cache.html

update_network_cache( array $networks )

Updates the network cache of given networks.

Description

Will add the networks in $networks to the cache. If network ID already exists in the network cache then it will not be updated. The network is added to the cache using the network group with the key using the ID of the networks.

Parameters

$networks array Required
Array of network row objects.

Source

File: wp-includes/ms-network.php. View all references

function update_network_cache( $networks ) {
	$data = array();
	foreach ( (array) $networks as $network ) {
		$data[ $network->id ] = $network;
	}
	wp_cache_add_multiple( $data, 'networks' );
}

Uses

Uses Description

Used By

Used By Description

Changelog

Version Description
4.6.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/update_network_cache