Introduce Notoptions and Alloptions caching, so that all options (and previously attempted Notoptions) are read from the cache in one go. Should reduce cache misses to zero or close to it. fixes #3726

git-svn-id: https://develop.svn.wordpress.org/trunk@4855 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2007-02-01 08:53:08 +00:00
parent cee4ff919b
commit ea8fc7def2
3 changed files with 97 additions and 35 deletions

View File

@@ -191,21 +191,8 @@ class WP_Object_Cache {
foreach ($dogs as $catt)
$this->cache['category'][$catt->cat_ID] = $catt;
}
} else
if ('options' == $group) {
$wpdb->hide_errors();
if (!$options = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'")) {
$options = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options");
}
$wpdb->show_errors();
}
if ( ! $options )
return;
foreach ($options as $option) {
$this->cache['options'][$option->option_name] = $option->option_value;
}
}
}
function make_group_dir($group, $perms) {