WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/update post cache

Description

Updates the cache for each post passed in.

NOTE: despite name, it does not take a single post object or ID; it takes only an array of post objects.

Usage

<?php update_post_cache$posts ); ?>

Parameters

$posts
(array) (required) Array of post objects. Passed by reference.
Default: None

Return Values

This function does not return a value.

Examples

Notes

Change Log

Source File

update_post_cache() is located in wp-includes/post.php.

Related

Post Cache Functions: clean_post_cache(), update_post_cache(), update_post_caches(), update_postmeta_cache()

This page is marked as incomplete. You can help Codex by expanding it.