Use 'counts' cache group. see #6884
git-svn-id: https://develop.svn.wordpress.org/trunk@7878 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
81c20ec884
commit
d44e29da33
@ -453,7 +453,7 @@ function wp_count_comments( $post_id = 0 ) {
|
||||
|
||||
$post_id = (int) $post_id;
|
||||
|
||||
$count = wp_cache_get('comments', "counts-{$post_id}");
|
||||
$count = wp_cache_get("comments-{$post_id}", 'counts');
|
||||
|
||||
if ( false !== $count )
|
||||
return $count;
|
||||
@ -479,7 +479,7 @@ function wp_count_comments( $post_id = 0 ) {
|
||||
}
|
||||
|
||||
$stats = (object) $stats;
|
||||
wp_cache_set('comments', $stats, "counts-{$post_id}");
|
||||
wp_cache_set("comments-{$post_id}", $stats, 'counts');
|
||||
|
||||
return $stats;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user