function update_comment_cache($comments) {}

Updates the comment cache of given comments.
Will add the comments in $comments to the cache. If comment ID already exists in the comment cache then it will not be updated. The comment is added to the cache using the comment group with the key using the ID of the comments.


  • array $comments: Array of comment row objects

Source code

function update_comment_cache($comments) {

	foreach ( (array) $comments as $comment )

		wp_cache_add($comment->comment_ID, $comment, 'comment');



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: