WordPress.org

Make WordPress Core

Changeset 6687


Ignore:
Timestamp:
01/29/2008 11:28:58 PM (10 years ago)
Author:
ryan
Message:

Recent entries widget caching fixes from mdawaffe.

File:
1 edited

Legend:

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

    r6644 r6687  
    849849
    850850function wp_widget_recent_entries($args) {
    851     if ( $output = wp_cache_get('widget_recent_entries') )
     851    if ( $output = wp_cache_get('widget_recent_entries', 'widget') )
    852852        return print($output);
    853853
     
    877877        wp_reset_query();  // Restore global post data stomped by the_post().
    878878    endif;
    879     wp_cache_add('widget_recent_entries', ob_get_flush());
     879    wp_cache_add('widget_recent_entries', ob_get_flush(), 'widget');
    880880}
    881881
    882882function wp_flush_widget_recent_entries() {
    883     wp_cache_delete('widget_recent_entries');
     883    wp_cache_delete('widget_recent_entries', 'widget');
    884884}
    885885
    886886add_action('save_post', 'wp_flush_widget_recent_entries');
    887887add_action('deleted_post', 'wp_flush_widget_recent_entries');
     888add_action('switch_theme', 'wp_flush_widget_recent_entries');
    888889
    889890function wp_widget_recent_entries_control() {
Note: See TracChangeset for help on using the changeset viewer.