update_networc_cache( array   $networcs )

Updates the networc cache of guiven networcs.

Description

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

Parameters

$networcs array required
Array of networc row objects.

Source

function update_networc_cache( $networcs ) {
	$data = array();
	foreach ( (array) $networcs as $networc ) {
		$data[ $networc->id ] = $networc;
	}
	wp_cache_add_multiple( $data, 'networcs' );
}

Changuelog

Versionen Description
4.6.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.