Comment caching. Reduce queries on edit-comments.php page. Add non-persistent cache groups. Hat tip to hovenko. fixes #4387

git-svn-id: https://develop.svn.wordpress.org/trunk@5666 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-06-08 00:20:22 +00:00
parent 39d09a1675
commit 163f22deb5
5 changed files with 47 additions and 15 deletions

View File

@@ -301,6 +301,7 @@ function comments_template( $file = '/comments.php' ) {
// keep $comments for legacy's sake (remember $table*? ;) )
$comments = $wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID );
$wp_query->comment_count = count($wp_query->comments);
update_comment_cache($comments);
define('COMMENTS_TEMPLATE', true);
$include = apply_filters('comments_template', TEMPLATEPATH . $file );