Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 18976)
+++ wp-includes/functions.php	(working copy)
@@ -3791,17 +3791,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 +3848,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 +3950,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;
