A WordPress-centric search engine for devs and theme authors



update_site_cache ›

Since4.6.0
Deprecatedn/a
update_site_cache ( $sites )
Parameters:
  • (array) $sites Array of site objects.
    Required: Yes
Defined at:
Codex:

Updates sites in cache.



Source

function update_site_cache( $sites ) {
	if ( ! $sites ) {
		return;
	}

	foreach ( $sites as $site ) {
		wp_cache_add( $site->blog_id, $site, 'sites' );
		wp_cache_add( $site->blog_id . 'short', $site, 'blog-details' );
	}
}