Make WordPress Core

Changeset 55566


Ignore:
Timestamp:
03/20/2023 04:40:12 PM (14 months ago)
Author:
SergeyBiryukov
Message:

Cache API: Correct the second parameter's name in _get_non_cached_ids().

The parameter represents the cache group, not the cache key.

Follow-up to [19918].

Props johnjamesjacoby, spacedmonkey.
Fixes #40420.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r55549 r55566  
    70107010 * @since 6.1.0 This function is no longer marked as "private".
    70117011 *
    7012  * @param int[]  $object_ids Array of IDs.
    7013  * @param string $cache_key  The cache bucket to check against.
     7012 * @param int[]  $object_ids  Array of IDs.
     7013 * @param string $cache_group The cache group to check against.
    70147014 * @return int[] Array of IDs not present in the cache.
    70157015 */
    7016 function _get_non_cached_ids( $object_ids, $cache_key ) {
     7016function _get_non_cached_ids( $object_ids, $cache_group ) {
    70177017    $object_ids = array_filter( $object_ids, '_validate_cache_id' );
    70187018    $object_ids = array_unique( array_map( 'intval', $object_ids ), SORT_NUMERIC );
     
    70237023
    70247024    $non_cached_ids = array();
    7025     $cache_values   = wp_cache_get_multiple( $object_ids, $cache_key );
     7025    $cache_values   = wp_cache_get_multiple( $object_ids, $cache_group );
    70267026
    70277027    foreach ( $cache_values as $id => $value ) {
Note: See TracChangeset for help on using the changeset viewer.