diff --git a/wp-includes/class-wp-comment-query.php b/wp-includes/class-wp-comment-query.php index eace9ccd01..920907906f 100644 --- a/wp-includes/class-wp-comment-query.php +++ b/wp-includes/class-wp-comment-query.php @@ -1030,13 +1030,19 @@ class WP_Comment_Query { $child_ids = array(); $uncached_parent_ids = array(); $_parent_ids = $levels[ $level ]; - foreach ( $_parent_ids as $parent_id ) { - $cache_key = "get_comment_child_ids:$parent_id:$key:$last_changed"; - $parent_child_ids = wp_cache_get( $cache_key, 'comment-queries' ); - if ( false !== $parent_child_ids ) { - $child_ids = array_merge( $child_ids, $parent_child_ids ); - } else { - $uncached_parent_ids[] = $parent_id; + if ( $_parent_ids ) { + $cache_keys = array(); + foreach ( $_parent_ids as $parent_id ) { + $cache_keys[ $parent_id ] = "get_comment_child_ids:$parent_id:$key:$last_changed"; + } + $cache_data = wp_cache_get_multiple( array_values( $cache_keys ), 'comment-queries' ); + foreach ( $_parent_ids as $parent_id ) { + $parent_child_ids = $cache_data[ $cache_keys[ $parent_id ] ]; + if ( false !== $parent_child_ids ) { + $child_ids = array_merge( $child_ids, $parent_child_ids ); + } else { + $uncached_parent_ids[] = $parent_id; + } } } diff --git a/wp-includes/version.php b/wp-includes/version.php index cf15f8da42..8e75165f25 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55606'; +$wp_version = '6.3-alpha-55607'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.