Make WordPress Core


Ignore:
Timestamp:
06/16/2020 06:28:57 AM (5 years ago)
Author:
whyisjake
Message:

Cache API: Add wp_cache_get_multiple() to core functions.

  • update_object_term_cache
  • update_meta_cache
  • _get_non_cached_ids

See [47938].

Fixes #50352.

Props spacedmonkey, tillkruss, lukecavanagh.

File:
1 edited

Legend:

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

    r48054 r48055  
    63606360 */
    63616361function _get_non_cached_ids( $object_ids, $cache_key ) {
    6362     $clean = array();
    6363     foreach ( $object_ids as $id ) {
     6362    $clean        = array();
     6363    $cache_values = wp_cache_get_multiple( $object_ids, $cache_key );
     6364    foreach ( $cache_values as $id => $cache_value ) {
    63646365        $id = (int) $id;
    6365         if ( ! wp_cache_get( $id, $cache_key ) ) {
     6366        if ( ! $cache_value ) {
    63666367            $clean[] = $id;
    63676368        }
Note: See TracChangeset for help on using the changeset viewer.