Index: wp-includes/cache.php
===================================================================
--- wp-includes/cache.php	(revision 6372)
+++ wp-includes/cache.php	(working copy)
@@ -43,6 +43,12 @@
 	return $wp_object_cache->replace($key, $data, $flag, $expire);
 }
 
+function wp_cache_resume() {
+	global $wp_object_cache;
+
+	$wp_object_cache->cache_suspended = false;
+}
+
 function wp_cache_set($key, $data, $flag = '', $expire = 0) {
 	global $wp_object_cache;
 	$data = unserialize(serialize($data));
@@ -50,12 +56,19 @@
 	return $wp_object_cache->set($key, $data, $flag, $expire);
 }
 
+function wp_cache_suspend() {
+	global $wp_object_cache;
+
+	$wp_object_cache->cache_suspended = true;
+}
+
 define('CACHE_SERIAL_HEADER', "<?php\n/*");
 define('CACHE_SERIAL_FOOTER', "*/\n?".">");
 
 class WP_Object_Cache {
 	var $cache_dir;
 	var $cache_enabled = false;
+	var $cache_suspended = false;
 	var $expiration_time = 900;
 	var $flock_filename = 'wp_object_cache.lock';
 	var $mutex;
@@ -120,6 +133,9 @@
 	}
 
 	function get($id, $group = 'default', $count_hits = true) {
+		if ( $this->cache_suspended )
+			return false;
+
 		if (empty ($group))
 			$group = 'default';
 
@@ -264,6 +280,9 @@
 	}
 
 	function set($id, $data, $group = 'default', $expire = '') {
+		if ( $this->cache_suspended )
+			return true;
+
 		if (empty ($group))
 			$group = 'default';
 
Index: wp-admin/includes/upgrade.php
===================================================================
--- wp-admin/includes/upgrade.php	(revision 6372)
+++ wp-admin/includes/upgrade.php	(working copy)
@@ -11,6 +11,7 @@
 
 	wp_check_mysql_version();
 	wp_cache_flush();
+	wp_cache_suspend();
 	make_db_current_silent();
 	populate_options();
 	populate_roles();
@@ -50,8 +51,6 @@
 
 	wp_new_blog_notification($blog_title, $guessurl, $user_id, $random_password);
 
-	wp_cache_flush();
-
 	return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $random_password);
 }
 endif;
Index: wp-admin/admin.php
===================================================================
--- wp-admin/admin.php	(revision 6372)
+++ wp-admin/admin.php	(working copy)
@@ -97,6 +97,7 @@
 	require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
 
 	define('WP_IMPORTING', true);
+	wp_cache_suspend();
 
 	call_user_func($wp_importers[$importer][2]);
 
