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

@@ -63,6 +63,7 @@ class WP_Object_Cache {
var $dirty_objects = array ();
var $non_existant_objects = array ();
var $global_groups = array ('users', 'userlogins', 'usermeta');
var $non_persistent_groups = array('comment');
var $blog_id;
var $cold_cache_hits = 0;
var $warm_cache_hits = 0;
@@ -308,6 +309,9 @@ class WP_Object_Cache {
// Loop over dirty objects and save them.
$errors = 0;
foreach ($this->dirty_objects as $group => $ids) {
if ( in_array($group, $this->non_persistent_groups) )
continue;
$group_dir = $this->make_group_dir($group, $dir_perms);
$ids = array_unique($ids);