WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/06/2009 10:25:35 PM (11 years ago)
Author:
ryan
Message:

Use transient for doing_cron. see #9048

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/cron.php

    r10474 r10519  
    185185    * try to make this as atomic as possible by setting doing_cron switch
    186186    */
    187     $flag = get_option('doing_cron');
     187    $flag = get_transient('doing_cron');
    188188
    189189    // clean up potential invalid value resulted from various system chaos
    190190    if ( $flag != 0 ) {
    191191        if ( $flag > $local_time + 10*60 || $flag < $local_time - 10*60 ) {
    192             update_option('doing_cron', 0);
     192            set_transient('doing_cron', 0);
    193193            $flag = 0;
    194194        }
     
    199199        return;
    200200
    201     update_option( 'doing_cron', $local_time + 30 );
     201    set_transient( 'doing_cron', $local_time + 30 );
    202202
    203203    add_action('wp_head', 'spawn_cron_request');
Note: See TracChangeset for help on using the changeset viewer.