WordPress.org

Make WordPress Core

Changeset 18264


Ignore:
Timestamp:
06/11/11 03:16:42 (3 years ago)
Author:
dd32
Message:

Key the Dashboard widget cache off the Widget ID & clear cache upon options changing. Props ocean90. Fixes #16927

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r18254 r18264  
    10431043    } 
    10441044 
    1045     $cache_key = 'dash_' . md5( $callback . implode(',', $check_urls) ); 
     1045    $cache_key = 'dash_' . $widget_id; 
    10461046    if ( false !== ( $output = get_transient( $cache_key ) ) ) { 
    10471047        echo $output; 
     
    11191119        } 
    11201120        update_option( 'dashboard_widget_options', $widget_options ); 
     1121        $cache_key = 'dash_' . $widget_id; 
     1122        delete_transient( $cache_key ); 
    11211123    } 
    11221124 
Note: See TracChangeset for help on using the changeset viewer.