Index: wp-admin/includes/dashboard.php
===================================================================
--- wp-admin/includes/dashboard.php	(revision 17525)
+++ wp-admin/includes/dashboard.php	(working copy)
@@ -767,7 +767,13 @@ function wp_dashboard_recent_comments_control() {
 }
 
 function wp_dashboard_incoming_links() {
-	echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
+	$widgets = get_option( 'dashboard_widget_options' );
+	if ( $cache = wp_cache_get( 'incoming_links_output_' . md5( serialize( @$widgets['dashboard_incoming_links'] ) ), 'dashboard' ) ) {
+		echo $cache;
+		return;
+	} else {
+		echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
+	}
 }
 
 /**
@@ -776,6 +782,7 @@ function wp_dashboard_incoming_links() {
  * @since 2.5.0
  */
 function wp_dashboard_incoming_links_output() {
+	ob_start();
 	$widgets = get_option( 'dashboard_widget_options' );
 	@extract( @$widgets['dashboard_incoming_links'], EXTR_SKIP );
 	$rss = fetch_feed( $url );
@@ -793,61 +800,64 @@ function wp_dashboard_incoming_links_output() {
 		echo '<p>' . __('This dashboard widget queries <a href="http://blogsearch.google.com/">Google Blog Search</a> so that when another blog links to your site it will show up here. It has found no incoming links&hellip; yet. It&#8217;s okay &#8212; there is no rush.') . "</p>\n";
 		$rss->__destruct();
 		unset($rss);
-		return;
-	}
+	} else {
 
-	echo "<ul>\n";
+		echo "<ul>\n";
 
-	if ( !isset($items) )
-		$items = 10;
+		if ( !isset($items) )
+			$items = 10;
 
-	foreach ( $rss->get_items(0, $items) as $item ) {
-		$publisher = '';
-		$site_link = '';
-		$link = '';
-		$content = '';
-		$date = '';
-		$link = esc_url( strip_tags( $item->get_link() ) );
+		foreach ( $rss->get_items(0, $items) as $item ) {
+			$publisher = '';
+			$site_link = '';
+			$link = '';
+			$content = '';
+			$date = '';
+			$link = esc_url( strip_tags( $item->get_link() ) );
 
-		$author = $item->get_author();
-		if ( $author ) {
-			$site_link = esc_url( strip_tags( $author->get_link() ) );
+			$author = $item->get_author();
+			if ( $author ) {
+				$site_link = esc_url( strip_tags( $author->get_link() ) );
 
-			if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
-				$publisher = __( 'Somebody' );
-		} else {
-		  $publisher = __( 'Somebody' );
-		}
-		if ( $site_link )
-			$publisher = "<a href='$site_link'>$publisher</a>";
-		else
-			$publisher = "<strong>$publisher</strong>";
+				if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
+					$publisher = __( 'Somebody' );
+			} else {
+			  $publisher = __( 'Somebody' );
+			}
+			if ( $site_link )
+				$publisher = "<a href='$site_link'>$publisher</a>";
+			else
+				$publisher = "<strong>$publisher</strong>";
 
-		$content = $item->get_content();
-		$content = wp_html_excerpt($content, 50) . ' ...';
+			$content = $item->get_content();
+			$content = wp_html_excerpt($content, 50) . ' ...';
 
-		if ( $link )
-			/* translators: incoming links feed, %1$s is other person, %3$s is content */
-			$text = __( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"' );
-		else
-			/* translators: incoming links feed, %1$s is other person, %3$s is content */
-			$text = __( '%1$s linked here saying, "%3$s"' );
-
-		if ( !empty($show_date) ) {
-			if ( !empty($show_author) || !empty($show_summary) )
-				/* translators: incoming links feed, %4$s is the date */
-				$text .= ' ' . __( 'on %4$s' );
-			$date = esc_html( strip_tags( $item->get_date() ) );
-			$date = strtotime( $date );
-			$date = gmdate( get_option( 'date_format' ), $date );
+			if ( $link )
+				/* translators: incoming links feed, %1$s is other person, %3$s is content */
+				$text = __( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"' );
+			else
+				/* translators: incoming links feed, %1$s is other person, %3$s is content */
+				$text = __( '%1$s linked here saying, "%3$s"' );
+
+			if ( !empty($show_date) ) {
+				if ( !empty($show_author) || !empty($show_summary) )
+					/* translators: incoming links feed, %4$s is the date */
+					$text .= ' ' . __( 'on %4$s' );
+				$date = esc_html( strip_tags( $item->get_date() ) );
+				$date = strtotime( $date );
+				$date = gmdate( get_option( 'date_format' ), $date );
+			}
+
+			echo "\t<li>" . sprintf( $text, $publisher, $link, $content, $date ) . "</li>\n";
 		}
 
-		echo "\t<li>" . sprintf( $text, $publisher, $link, $content, $date ) . "</li>\n";
+		echo "</ul>\n";
+		$rss->__destruct();
+		unset($rss);
 	}
-
-	echo "</ul>\n";
-	$rss->__destruct();
-	unset($rss);
+	$cache = ob_get_flush();
+	if ( $cache )
+		wp_cache_set( 'incoming_links_output_' . md5( serialize( @$widgets['dashboard_incoming_links'] ) ), $cache, 'dashboard', 30*15 );
 }
 
 function wp_dashboard_incoming_links_control() {
@@ -855,7 +865,13 @@ function wp_dashboard_incoming_links_control() {
 }
 
 function wp_dashboard_primary() {
-	echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
+	$widgets = get_option( 'dashboard_widget_options' );
+	if ( $cache = wp_cache_get( 'primary_output_' . md5( serialize( @$widgets['dashboard_primary'] ) ), 'dashboard' ) ) {
+		echo $cache;
+		return;
+	} else {
+		echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
+	}
 }
 
 function wp_dashboard_primary_control() {
@@ -870,14 +886,24 @@ function wp_dashboard_primary_control() {
  * @param string $widget_id
  */
 function wp_dashboard_rss_output( $widget_id ) {
+	ob_start();
 	$widgets = get_option( 'dashboard_widget_options' );
 	echo '<div class="rss-widget">';
 	wp_widget_rss_output( $widgets[$widget_id] );
 	echo "</div>";
+	$cache = ob_get_flush();
+	if ( $cache )
+		wp_cache_set( 'primary_output_' . md5( serialize( @$widgets['dashboard_primary'] ) ), $cache, 'dashboard', 30*15 );
 }
 
 function wp_dashboard_secondary() {
-	echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
+	$widgets = get_option( 'dashboard_widget_options' );
+	if ( $cache = wp_cache_get( 'secondary_output_' . md5( serialize( @$widgets['dashboard_secondary'] ) ), 'dashboard' ) ) {
+		echo $cache;
+		return;
+	} else {
+		echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
+	}
 }
 
 function wp_dashboard_secondary_control() {
@@ -892,10 +918,10 @@ function wp_dashboard_secondary_control() {
  * @return unknown
  */
 function wp_dashboard_secondary_output() {
+	ob_start();
 	$widgets = get_option( 'dashboard_widget_options' );
 	@extract( @$widgets['dashboard_secondary'], EXTR_SKIP );
 	$rss = @fetch_feed( $url );
-
 	if ( is_wp_error($rss) ) {
 		if ( is_admin() || current_user_can('manage_options') ) {
 			echo '<div class="rss-widget"><p>';
@@ -913,10 +939,18 @@ function wp_dashboard_secondary_output() {
 		$rss->__destruct();
 		unset($rss);
 	}
+	$cache = ob_get_flush();
+	if ( $cache )
+		wp_cache_set( 'secondary_output_' . md5( serialize( @$widgets['dashboard_secondary'] ) ), $cache, 'dashboard', 30*15 );
 }
 
 function wp_dashboard_plugins() {
-	echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
+	if ( $cache = wp_cache_get( 'plugins_output', 'dashboard' ) ) {
+		echo $cache;
+		return;
+	} else {
+		echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
+	}
 }
 
 /**
@@ -925,6 +959,7 @@ function wp_dashboard_plugins() {
  * @since 2.5.0
  */
 function wp_dashboard_plugins_output() {
+	ob_start();
 	$popular = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/popular/' );
 	$new     = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/new/' );
 	$updated = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/updated/' );
@@ -998,6 +1033,9 @@ function wp_dashboard_plugins_output() {
 		$$feed->__destruct();
 		unset($$feed);
 	}
+	$cache = ob_get_flush();
+	if ( $cache )
+		wp_cache_set( 'plugins_output', $cache, 'dashboard', 30*60 );
 }
 
 /**
