update_post_cache( WP_Post[] $posts )

Updates posts in cache.


Description Description


Parameters Parameters

$posts

(WP_Post[]) (Required) Array of post objects (passed by reference).


Top ↑

Source 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' );
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.5.1 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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