Changeset 4798 for trunk/wp-includes/functions.php
- Timestamp:
- 01/25/2007 12:12:08 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r4752 r4798 204 204 global $wpdb; 205 205 206 // prevent non-existent options from triggering multiple queries 207 if ( true === wp_cache_get($setting, 'notoptions') ) 208 return false; 209 206 210 $value = wp_cache_get($setting, 'options'); 207 211 … … 216 220 $value = $row->option_value; 217 221 wp_cache_set($setting, $value, 'options'); 218 } else { 222 } else { // option does not exist, so we must cache its non-existence 223 wp_cache_set($setting, true, 'notoptions'); 219 224 return false; 220 225 } … … 274 279 return true; 275 280 } 281 282 if ( true === wp_cache_get($option_name, 'notoptions') ) 283 wp_cache_delete($option_name, 'notoptions'); 276 284 277 285 $_newvalue = $newvalue;
Note: See TracChangeset
for help on using the changeset viewer.