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