mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-24 23:34:30 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user