Ticket #31245: 31245.4.fabian-race-fix.diff
File 31245.4.fabian-race-fix.diff, 1.2 KB (added by , 5 years ago) |
---|
-
src/wp-includes/option.php
189 189 * Loads and caches all autoloaded options, if available or all options. 190 190 * 191 191 * @since 2.2.0 192 * @since 5.4.0 The `$force_cache` parameter was added. 192 193 * 193 194 * @global wpdb $wpdb WordPress database abstraction object. 194 195 * 196 * @param bool $force_cache Optional. Whether to force an update of the local cache 197 * from the persistent cache. Default false. 195 198 * @return array List of all options. 196 199 */ 197 function wp_load_alloptions( ) {200 function wp_load_alloptions( $force_cache = false ) { 198 201 global $wpdb; 199 202 200 203 if ( ! wp_installing() || ! is_multisite() ) { 201 $alloptions = wp_cache_get( 'alloptions', 'options' );204 $alloptions = wp_cache_get( 'alloptions', 'options', $force_cache ); 202 205 } else { 203 206 $alloptions = false; 204 207 } … … 397 400 } 398 401 399 402 if ( ! wp_installing() ) { 400 $alloptions = wp_load_alloptions( );403 $alloptions = wp_load_alloptions( true ); 401 404 if ( isset( $alloptions[ $option ] ) ) { 402 405 $alloptions[ $option ] = $serialized_value; 403 406 wp_cache_set( 'alloptions', $alloptions, 'options' );