Index: src/wp-includes/cache-compat.php
===================================================================
--- src/wp-includes/cache-compat.php	(nonexistent)
+++ src/wp-includes/cache-compat.php	(working copy)
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Object Cache API functions missing from 3rd party object caches.
+ *
+ * @link https://codex.wordpress.org/Class_Reference/WP_Object_Cache
+ *
+ * @package WordPress
+ * @subpackage Cache
+ */
+
+if ( ! function_exists( 'wp_cache_get_multiple' ) ) :
+	/**
+	 * Compat function to mimic wp_cache_get_multiple.
+	 * Retrieves multiple values from the cache.
+	 *
+	 * @ignore
+	 * @since 5.5.0
+	 *
+	 * @see wp_cache_get_multiple()
+	 *
+	 * @param array $keys        Array of keys to fetch.
+	 * @param bool  $force       Optional. Unused. Whether to force a refetch rather than relying on the local
+	 *                           cache. Default false.
+	 *
+	 * @return array Array of values organized into groups.
+	 */
+	function wp_cache_get_multiple( $keys, $group = 'default', $force = false ) {
+		$values = array();
+
+		foreach ( $keys as $key ) {
+			$values[ $key ] = wp_cache_get( $key, $group, $force );
+		}
+
+		return $values;
+	}
+endif;

Property changes on: src/wp-includes/cache-compat.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: src/wp-includes/cache.php
===================================================================
--- src/wp-includes/cache.php	(revision 47222)
+++ src/wp-includes/cache.php	(working copy)
@@ -127,6 +127,24 @@
 }
 
 /**
+ * Gets multiple values from cache in one call.
+ *
+ * @since 5.5.0
+ * @see WP_Object_Cache::get_multiple()
+ *
+ * @param array       $keys   Array of keys to get from group.
+ * @param string      $group  Optional. Where the cache contents are grouped. Default empty.
+ * @param bool        $force  Optional. Whether to force an update of the local cache from the persistent
+ *                            cache. Default false.
+ * @return array|bool Array of values.
+ */
+function wp_cache_get_multiple( $keys, $group = '', $force = false ) {
+	global $wp_object_cache;
+
+	return $wp_object_cache->get_multiple( $keys, $group, $force );
+}
+
+/**
  * Increment numeric cache item's value
  *
  * @since 3.3.0
Index: src/wp-includes/class-wp-object-cache.php
===================================================================
--- src/wp-includes/class-wp-object-cache.php	(revision 47222)
+++ src/wp-includes/class-wp-object-cache.php	(working copy)
@@ -303,6 +303,27 @@
 	}
 
 	/**
+	 * Retrieves multiple values from the cache.
+	 *
+	 * @since  5.5.0
+	 *
+	 * @param array $keys        Array of keys to fetch.
+	 * @param bool  $force       Optional. Unused. Whether to force a refetch rather than relying on the local
+	 *                           cache. Default false.
+	 *
+	 * @return array Array of values organized into groups.
+	 */
+	public function get_multiple( $keys, $group = 'default', $force = false ) {
+		$values = array();
+
+		foreach ( $keys as $key ) {
+			$values[ $key ] = $this->get( $key, $group, $force );
+		}
+
+		return $values;
+	}
+
+	/**
 	 * Increments numeric cache item's value.
 	 *
 	 * @since 3.3.0
Index: src/wp-includes/load.php
===================================================================
--- src/wp-includes/load.php	(revision 47222)
+++ src/wp-includes/load.php	(working copy)
@@ -569,6 +569,8 @@
 		require_once ABSPATH . WPINC . '/cache.php';
 	}
 
+	require_once( ABSPATH . WPINC . '/cache-compat.php' );
+
 	/*
 	 * If cache supports reset, reset instead of init if already
 	 * initialized. Reset signals to the cache that global IDs
Index: tests/phpunit/tests/cache.php
===================================================================
--- tests/phpunit/tests/cache.php	(revision 47222)
+++ tests/phpunit/tests/cache.php	(working copy)
@@ -315,4 +315,23 @@
 		// Make sure $fake_key is not stored.
 		$this->assertFalse( wp_cache_get( $fake_key ) );
 	}
+
+	/**
+	 * @ticket 20875
+	 */
+	public function test_get_multiple() {
+		wp_cache_set( 'foo1', 'bar', 'group1' );
+		wp_cache_set( 'foo2', 'bar', 'group1' );
+		wp_cache_set( 'foo1', 'bar', 'group2' );
+
+		$found = wp_cache_get_multiple( array( 'foo1', 'foo2', 'foo3', ), 'group1' );
+
+		$expected = array(
+			'foo1' => 'bar',
+			'foo2' => 'bar',
+			'foo3' => false,
+		);
+
+		$this->assertSame( $expected, $found );
+	}
 }
Index: tests/phpunit/tests/pluggable.php
===================================================================
--- tests/phpunit/tests/pluggable.php	(revision 47222)
+++ tests/phpunit/tests/pluggable.php	(working copy)
@@ -290,6 +290,11 @@
 						'force' => false,
 						'found' => null,
 					),
+					'wp_cache_get_multiple'              => array(
+						'keys',
+						'group' => '',
+						'force' => false,
+					),
 					'wp_cache_incr'                      => array(
 						'key',
 						'offset' => 1,
