Cache API: Include the `cache-compat` file.

This was missed during the prior commit.

See [47938].


Built from https://develop.svn.wordpress.org/trunk@47939


git-svn-id: http://core.svn.wordpress.org/trunk@47712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
whyisjake 2020-06-09 19:50:09 +00:00
parent 3e2b649351
commit ae76b79f85
2 changed files with 37 additions and 1 deletions

View File

@ -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;

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.5-alpha-47938'; $wp_version = '5.5-alpha-47939';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.