Definition:
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.
Parameters
- 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'); }
3165
No comments yet... Be the first to leave a reply!