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).
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' );
}
}
Expand full source code Collapse full source code View on Trac
Changelog Changelog
| Version | Description |
|---|---|
| 1.5.1 | Introduced. |