Ensure that the count cache for all is in sync with comment-{$post_id} values. These are the values most often relied-upon by the list table for comments.

Adds unit tests.

See #33875.


git-svn-id: https://develop.svn.wordpress.org/trunk@34136 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-09-14 22:38:02 +00:00
parent 354000b5ca
commit 8cb6843170
2 changed files with 41 additions and 1 deletions

View File

@@ -1916,6 +1916,7 @@ function wp_update_comment_count_now($post_id) {
clean_post_cache( $post );
wp_cache_delete( 'comments-0', 'counts' );
wp_cache_delete( "comments-{$post_id}", 'counts' );
/**