update_post_cache( array $posts )

Updates posts in cache.


Parameters

$posts

(array) (Required) Array of post objects (passed by reference).


Source

File: wp-includes/post.php

function update_post_cache( &$posts ) {
	if ( ! $posts )
		return;

	foreach ( $posts as $post )
		wp_cache_add( $post->ID, $post, 'posts' );
}


Changelog

Changelog
Version Description
WP-1.5.1 Introduced.