Index: src/wp-includes/class-wp-site-query.php
===================================================================
--- src/wp-includes/class-wp-site-query.php	(revision 41966)
+++ src/wp-includes/class-wp-site-query.php	(working copy)
@@ -229,6 +229,7 @@
 	 *                   or the number of sites when 'count' is passed as a query var.
 	 */
 	public function get_sites() {
+		$query_vars = $this->query_vars;
 		$this->parse_query();
 
 		/**
@@ -240,16 +241,8 @@
 		 */
 		do_action_ref_array( 'pre_get_sites', array( &$this ) );
 
-		// $args can include anything. Only use the args defined in the query_var_defaults to compute the key.
-		$_args = wp_array_slice_assoc( $this->query_vars, array_keys( $this->query_var_defaults ) );
+		$cache_key = $this->get_cache_key( $query_vars );
 
-		// Ignore the $fields argument as the queried result will be the same regardless.
-		unset( $_args['fields'] );
-
-		$key = md5( serialize( $_args ) );
-		$last_changed = wp_cache_get_last_changed( 'sites' );
-
-		$cache_key = "get_sites:$key:$last_changed";
 		$cache_value = wp_cache_get( $cache_key, 'sites' );
 
 		if ( false === $cache_value ) {
@@ -315,6 +308,44 @@
 		return $this->sites;
 	}
 
+
+	protected function get_cache_key( $query_vars = '' ) {
+		if ( empty( $query_vars ) ) {
+			$query_vars = $this->query_vars;
+		}
+
+		$query_vars_key = array_keys( $query_vars );
+		$search         = array( 'domain', 'path', 'network_id', 'number' );
+		$diff           = array_diff( $query_vars_key, $search );
+
+		if ( $query_vars['number'] == 1 && count( $diff ) == 0 ) {
+			$_args = array();
+			array_pop( $search );
+			foreach ( $search as $element ) {
+				if ( empty( $query_vars[ $element ] ) ) {
+					break;
+				}
+				$_args[] = $query_vars[ $element ];
+			}
+			$key       = md5( serialize( $_args ) );
+			$cache_key = "get_sites:$key";
+		} else {
+			// $args can include anything. Only use the args defined in the query_var_defaults to compute the key.
+			$_args = wp_array_slice_assoc( $query_vars, array_keys( $this->query_var_defaults ) );
+
+			// Ignore the $fields argument as the queried result will be the same regardless.
+			unset( $_args['fields'] );
+
+			// Ignore the $update_site_cache as it does not affect the query.
+			unset( $_args['update_site_cache'] );
+			$key          = md5( serialize( ksort( $_args ) ) );
+			$last_changed = wp_cache_get_last_changed( 'sites' );
+			$cache_key    = "get_sites:$key:$last_changed";
+		}
+
+		return $cache_key;
+	}
+
 	/**
 	 * Used internally to get a list of site IDs matching the query vars.
 	 *
Index: src/wp-includes/ms-blogs.php
===================================================================
--- src/wp-includes/ms-blogs.php	(revision 41966)
+++ src/wp-includes/ms-blogs.php	(working copy)
@@ -444,9 +444,10 @@
 
 		// Make sure a WP_Site object exists even when the site has been deleted.
 		$blog = new WP_Site( (object) array(
-			'blog_id' => $blog_id,
-			'domain'  => null,
-			'path'    => null,
+			'blog_id'    => $blog_id,
+			'domain'     => null,
+			'path'       => null,
+			'network_id' => get_current_network_id()
 		) );
 	}
 
@@ -462,6 +463,16 @@
 	wp_cache_delete( 'current_blog_' . $blog->domain, 'site-options' );
 	wp_cache_delete( 'current_blog_' . $blog->domain . $blog->path, 'site-options' );
 
+
+	$list  = array( 'domain', 'path', 'network_id' );
+	$_args = array();
+	foreach ( $list as $element ) {
+		$_args[]   = $blog->$element;
+		$key       = md5( serialize( $_args ) );
+		$cache_key = "get_sites:$key";
+		wp_cache_delete( $cache_key, 'sites' );
+	}
+
 	/**
 	 * Fires immediately after a site has been removed from the object cache.
 	 *
