Ticket #27565: 27565.diff
File 27565.diff, 1.0 KB (added by , 10 years ago) |
---|
-
default-widgets.php
661 661 662 662 public function widget($args, $instance) { 663 663 $cache = array(); 664 $cache_key = 'widget_recent_posts_' . ( is_ssl() ? 'https' : 'http' ); 664 665 if ( ! $this->is_preview() ) { 665 $cache = wp_cache_get( 'widget_recent_posts', 'widget' );666 $cache = wp_cache_get( $cache_key, 'widget' ); 666 667 } 667 668 668 669 if ( ! is_array( $cache ) ) { … … 731 732 732 733 if ( ! $this->is_preview() ) { 733 734 $cache[ $args['widget_id'] ] = ob_get_flush(); 734 wp_cache_set( 'widget_recent_posts', $cache, 'widget' );735 wp_cache_set( $cache_key, $cache, 'widget' ); 735 736 } else { 736 737 ob_end_flush(); 737 738 } … … 752 753 } 753 754 754 755 public function flush_widget_cache() { 755 wp_cache_delete('widget_recent_posts', 'widget'); 756 wp_cache_delete('widget_recent_posts_http', 'widget'); 757 wp_cache_delete('widget_recent_posts_https', 'widget'); 756 758 } 757 759 758 760 public function form( $instance ) {