Ticket #31245: fabian-race-fix.diff
File fabian-race-fix.diff, 1.3 KB (added by , 7 years ago) |
---|
-
wp-includes/option.php
a b 173 173 * @since 2.2.0 174 174 * 175 175 * @global wpdb $wpdb WordPress database abstraction object. 176 176 * 177 177 * @return array List of all options. 178 178 */ 179 function wp_load_alloptions( ) {179 function wp_load_alloptions($force_cache = false) { 180 180 global $wpdb; 181 181 182 182 if ( wp_using_ext_object_cache() && (! wp_installing() || ! is_multisite() ) ) 183 $alloptions = wp_cache_get( 'alloptions', 'options' );183 $alloptions = wp_cache_get( 'alloptions', 'options', $force_cache ); 184 184 else 185 185 $alloptions = false; 186 186 187 187 if ( !$alloptions ) { 188 188 $suppress = $wpdb->suppress_errors(); 189 189 if ( !$alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ) ) … … 347 347 if ( is_array( $notoptions ) && isset( $notoptions[$option] ) ) { 348 348 unset( $notoptions[$option] ); 349 349 wp_cache_set( 'notoptions', $notoptions, 'options' ); 350 350 } 351 351 352 352 if ( ! wp_installing() ) { 353 $alloptions = wp_load_alloptions( );353 $alloptions = wp_load_alloptions( true ); 354 354 if ( isset( $alloptions[$option] ) ) { 355 355 $alloptions[ $option ] = $serialized_value; 356 356 wp_cache_set( 'alloptions', $alloptions, 'options' ); 357 357 } else { 358 358 wp_cache_set( $option, $serialized_value, 'options' ); 359 359 }