Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 21378)
+++ wp-includes/comment.php	(working copy)
@@ -406,28 +406,30 @@
  */
 function get_lastcommentmodified($timezone = 'server') {
 	global $wpdb;
-	static $cache_lastcommentmodified = array();
 
-	if ( isset($cache_lastcommentmodified[$timezone]) )
-		return $cache_lastcommentmodified[$timezone];
+	$timezone = strtolower( $timezone );
+	if ( ! in_array( $timezone, array( 'gmt', 'blog', 'server' ) ) )
+		return;
 
+	if ( $last_modified = wp_cache_get( "lastmodified:$timezone", 'comment' ) )
+		return $last_modified;
+
 	$add_seconds_server = date('Z');
 
-	switch ( strtolower($timezone)) {
+	switch ( $timezone ) {
 		case 'gmt':
-			$lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
+			$last_modified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
 			break;
 		case 'blog':
-			$lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
+			$last_modified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
 			break;
 		case 'server':
-			$lastcommentmodified = $wpdb->get_var($wpdb->prepare("SELECT DATE_ADD(comment_date_gmt, INTERVAL %s SECOND) FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1", $add_seconds_server));
+			$last_modified = $wpdb->get_var($wpdb->prepare("SELECT DATE_ADD(comment_date_gmt, INTERVAL %s SECOND) FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1", $add_seconds_server));
 			break;
 	}
 
-	$cache_lastcommentmodified[$timezone] = $lastcommentmodified;
-
-	return $lastcommentmodified;
+	wp_cache_add( "lastmodified:$timezone", $last_modified, 'comment' );
+	return $last_modified;
 }
 
 /**
@@ -1930,6 +1932,9 @@
 		wp_cache_delete($id, 'comment');
 
 	wp_cache_set('last_changed', time(), 'comment');
+	wp_cache_delete( 'lastmodified:gmt', 'comment' );
+	wp_cache_delete( 'lastmodified:server', 'comment' );
+	wp_cache_delete( 'lastmodified:blog', 'comment' );
 }
 
 /**
