mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Cache: Use wp_cache_*_multiple() in core functions.
Implement the `wp_cache_add_multiple`, `wp_cache_set_multiple` and `wp_cache_delete_multiple` in a number of core functions after they were introduced in [52700] Props: spacedmonkey, adamsilverstein, flixos90, mitogh. Fixes: #55029. git-svn-id: https://develop.svn.wordpress.org/trunk@52707 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1058,10 +1058,12 @@ class WP_Comment_Query {
|
||||
$child_ids[] = $level_comment->comment_ID;
|
||||
}
|
||||
|
||||
$data = array();
|
||||
foreach ( $parent_map as $parent_id => $children ) {
|
||||
$cache_key = "get_comment_child_ids:$parent_id:$key:$last_changed";
|
||||
wp_cache_set( $cache_key, $children, 'comment' );
|
||||
$cache_key = "get_comment_child_ids:$parent_id:$key:$last_changed";
|
||||
$data[ $cache_key ] = $children;
|
||||
}
|
||||
wp_cache_set_multiple( $data, 'comment' );
|
||||
}
|
||||
|
||||
$level++;
|
||||
|
||||
Reference in New Issue
Block a user