From 005fd4f14f9656adadd5cc4fab8e56b904b3afbf Mon Sep 17 00:00:00 2001 From: azaozz Date: Thu, 9 Apr 2009 13:23:10 +0000 Subject: [PATCH] Use cached feed data on the Dashboard, props DD32, #9483 git-svn-id: http://svn.automattic.com/wordpress/trunk@10901 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/dashboard.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index db73592f29..cd210a7179 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -838,20 +838,14 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar $check_urls = array( $widgets[$widget_id]['url'] ); } - - /* TODO Cache check here. + include_once ABSPATH . WPINC . '/class-feed.php'; foreach ( $check_urls as $check_url ) { - - if ( 'HIT' !== $status ) { + $cache = new WP_Feed_Cache_Transient('', md5($check_url), ''); + if ( ! $cache->load() ) { echo $loading; return false; } } - */ - - // Always load async until above fixed. - echo $loading; - return false; if ( $callback && is_callable( $callback ) ) { $args = array_slice( func_get_args(), 2 );