Index: src/wp-includes/ms-functions.php
===================================================================
--- src/wp-includes/ms-functions.php	(revision 41717)
+++ src/wp-includes/ms-functions.php	(working copy)
@@ -331,29 +331,15 @@
 function get_blog_id_from_url( $domain, $path = '/' ) {
 	$domain = strtolower( $domain );
 	$path = strtolower( $path );
-	$id = wp_cache_get( md5( $domain . $path ), 'blog-id-cache' );
 
-	if ( $id == -1 ) // blog does not exist
-		return 0;
-	elseif ( $id )
-		return (int) $id;
-
-	$args = array(
-		'domain' => $domain,
-		'path' => $path,
-		'fields' => 'ids',
-	);
-	$result = get_sites( $args );
-	$id = array_shift( $result );
+	$url = $domain . '/' . trim( $path, '/' ) . '/';
+	$result = get_site_by( 'url', $url );
 
-	if ( ! $id ) {
-		wp_cache_set( md5( $domain . $path ), -1, 'blog-id-cache' );
+	if ( ! $result ) {
 		return 0;
 	}
 
-	wp_cache_set( md5( $domain . $path ), $id, 'blog-id-cache' );
-
-	return $id;
+	return $result->id;
 }
 
 // Admin functions
Index: tests/phpunit/tests/multisite/site.php
===================================================================
--- tests/phpunit/tests/multisite/site.php	(revision 41717)
+++ tests/phpunit/tests/multisite/site.php	(working copy)
@@ -667,7 +667,6 @@
 
 		// Test the original response and cached response for the newly created site.
 		$this->assertEquals( $blog_id, get_blog_id_from_url( $details->domain, $details->path ) );
-		$this->assertEquals( $blog_id, wp_cache_get( $key, 'blog-id-cache' ) );
 	}
 
 	/**
@@ -688,7 +687,6 @@
 		$details = get_site( $blog_id );
 
 		$this->assertEquals( 0, get_blog_id_from_url( $details->domain, 'foo' ) );
-		$this->assertEquals( -1, wp_cache_get( md5( $details->domain . 'foo' ), 'blog-id-cache' ) );
 	}
 
 	/**
@@ -698,26 +696,10 @@
 	function test_get_blog_id_from_url_with_deleted_flag() {
 		$blog_id = self::factory()->blog->create();
 		$details = get_site( $blog_id );
-		$key = md5( $details->domain . $details->path );
+
 		wpmu_delete_blog( $blog_id );
 
 		$this->assertEquals( $blog_id, get_blog_id_from_url( $details->domain, $details->path ) );
-		$this->assertEquals( $blog_id, wp_cache_get( $key, 'blog-id-cache' ) );
-	}
-
-	/**
-	 * When deleted with the drop parameter as true, the cache will first be false, then set to
-	 * -1 after an attempt at `get_blog_id_from_url()` is made.
-	 */
-	function test_get_blog_id_from_url_after_dropped() {
-		$blog_id = self::factory()->blog->create();
-		$details = get_site( $blog_id );
-		$key = md5( $details->domain . $details->path );
-		wpmu_delete_blog( $blog_id, true );
-
-		$this->assertEquals( false, wp_cache_get( $key, 'blog-id-cache' ) );
-		$this->assertEquals( 0, get_blog_id_from_url( $details->domain, $details->path ) );
-		$this->assertEquals( -1, wp_cache_get( $key, 'blog-id-cache' ) );
 	}
 
 	/**
