WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/11/2013 06:08:14 PM (9 years ago)
Author:
ryan
Message:

Use microtime() instead of incrementors for last_changed to to avoid race conditions with cache evictions.

Props westi
fixes #23448

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r23385 r23401  
    920920    $last_changed = wp_cache_get( 'last_changed', 'posts' );
    921921    if ( ! $last_changed ) {
    922         $last_changed = 1;
     922        $last_changed = microtime();
    923923        wp_cache_set( 'last_changed', $last_changed, 'posts' );
    924924    }
Note: See TracChangeset for help on using the changeset viewer.