Use 'counts' cache group. see #6884
git-svn-id: http://svn.automattic.com/wordpress/trunk@7878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c75f6c7695
commit
63d12e0b39
|
@ -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