Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 18977)
+++ wp-includes/functions.php	(working copy)
@@ -473,17 +473,28 @@
 		$site_id = $wpdb->siteid;
 
 	$core_options = array('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled' );
+	$existing_core_options = array();
 
 	$core_options_in = "'" . implode("', '", $core_options) . "'";
 	$options = $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value FROM $wpdb->sitemeta WHERE meta_key IN ($core_options_in) AND site_id = %d", $site_id) );
 
 	foreach ( $options as $option ) {
 		$key = $option->meta_key;
+		$existing_core_options[] = $key;
 		$cache_key = "{$site_id}:$key";
 		$option->meta_value = maybe_unserialize( $option->meta_value );
 
 		wp_cache_set( $cache_key, $option->meta_value, 'site-options' );
 	}
+	
+	$core_not_options = array_diff( $core_options, $existing_core_options );
+	if ( ! empty( $core_not_options ) ) {
+		$notoptions = wp_cache_get( 'notoptions', 'site-options' );
+		foreach( $core_not_options as $key )
+			$notoptions[ $key ] = true;
+	
+		wp_cache_set( 'notoptions', $notoptions, 'site-options' );
+	}
 }
 
 /**
@@ -3791,17 +3802,25 @@
 		$value = get_option($option, $default);
 	} else {
 		$cache_key = "{$wpdb->siteid}:$option";
-		if ( $use_cache )
-			$value = wp_cache_get($cache_key, 'site-options');
+		if ( $use_cache ) {
+			$notoptions = wp_cache_get( 'notoptions', 'site-options' );
+			if ( isset( $notoptions[ $cache_key ] ) )
+				return $default;
 
+			$value = wp_cache_get( $cache_key, 'site-options' );
+		}
+
 		if ( !isset($value) || (false === $value) ) {
 			$row = $wpdb->get_row( $wpdb->prepare("SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = %s AND site_id = %d", $option, $wpdb->siteid ) );
 
 			// Has to be get_row instead of get_var because of funkiness with 0, false, null values
-			if ( is_object( $row ) )
+			if ( is_object( $row ) ) {
 				$value = $row->meta_value;
-			else
-				$value = $default;
+			} else {
+				$notoptions[ $cache_key ] = true;
+				wp_cache_set( 'notoptions', $notoptions, 'site-options' );
+				return $default;
+			}
 
 			$value = maybe_unserialize( $value );
 
@@ -3840,15 +3859,24 @@
 	} else {
 		$cache_key = "{$wpdb->siteid}:$option";
 
-		if ( false !== get_site_option( $option ) )
-			return false;
+		// make sure the option doesn't already exist
+		$notoptions = wp_cache_get( 'notoptions', 'site-options' );
+		if ( ! isset( $notoptions[ $cache_key ] ) )
+			if ( false !== get_site_option( $option ) )
+				return false;
 
 		$value = sanitize_option( $option, $value );
 		wp_cache_set( $cache_key, $value, 'site-options' );
 
+		$notoptions = wp_cache_get( 'notoptions', 'site-options' ); // yes, again... we need it to be fresh
+		if ( isset( $notoptions[ $cache_key ] ) ) {
+			unset( $notoptions[ $cache_key ] );
+			wp_cache_set( 'notoptions', $notoptions, 'site-options' );
+		}
+
 		$_value = $value;
 		$value = maybe_serialize( $value );
-		$result = $wpdb->insert( $wpdb->sitemeta, array('site_id' => $wpdb->siteid, 'meta_key' => $option, 'meta_value' => $value ) );
+		$result = $wpdb->insert( $wpdb->sitemeta, array( 'site_id' => $wpdb->siteid, 'meta_key' => $option, 'meta_value' => $value ) );
 		$value = $_value;
 	}
 
@@ -3933,8 +3961,15 @@
 	if ( !is_multisite() ) {
 		$result = update_option( $option, $value );
 	} else {
+		$cache_key = "{$wpdb->siteid}:$option";
+
+		$notoptions = wp_cache_get( 'notoptions', 'site-options' );
+		if ( isset( $notoptions[ $cache_key ] ) ) {
+			unset( $notoptions[ $cache_key ] );
+			wp_cache_set( 'notoptions', $notoptions, 'site-options' );
+		}
+
 		$value = sanitize_option( $option, $value );
-		$cache_key = "{$wpdb->siteid}:$option";
 		wp_cache_set( $cache_key, $value, 'site-options' );
 
 		$_value = $value;
