Ticket #27565: 27565.2.diff
File 27565.2.diff, 1.1 KB (added by , 9 years ago) |
---|
-
src/wp-includes/default-widgets.php
793 793 * @param array $instance 794 794 */ 795 795 public function widget( $args, $instance ) { 796 $cache = array(); 796 $cache = array(); 797 $cache_key = 'widget_recent_posts_' . ( is_ssl() ? 'https' : 'http' ); 798 797 799 if ( ! $this->is_preview() ) { 798 $cache = wp_cache_get( 'widget_recent_posts', 'widget' );800 $cache = wp_cache_get( $cache_key, 'widget' ); 799 801 } 800 802 801 803 if ( ! is_array( $cache ) ) { … … 864 866 865 867 if ( ! $this->is_preview() ) { 866 868 $cache[ $args['widget_id'] ] = ob_get_flush(); 867 wp_cache_set( 'widget_recent_posts', $cache, 'widget' );869 wp_cache_set( $cache_key, $cache, 'widget' ); 868 870 } else { 869 871 ob_end_flush(); 870 872 } … … 893 895 * @access public 894 896 */ 895 897 public function flush_widget_cache() { 896 wp_cache_delete('widget_recent_posts', 'widget'); 898 wp_cache_delete( 'widget_recent_posts_http', 'widget' ); 899 wp_cache_delete( 'widget_recent_posts_https', 'widget' ); 897 900 } 898 901 899 902 /**