Changeset 60697 for trunk/src/wp-includes/class-wp-comment-query.php
- Timestamp:
- 08/31/2025 09:41:54 PM (7 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-comment-query.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-comment-query.php
r60291 r60697 452 452 $last_changed = wp_cache_get_last_changed( 'comment' ); 453 453 454 $cache_key = "get_comments:$key :$last_changed";455 $cache_value = wp_cache_get ( $cache_key, 'comment-queries');454 $cache_key = "get_comments:$key"; 455 $cache_value = wp_cache_get_salted( $cache_key, 'comment-queries', $last_changed ); 456 456 if ( false === $cache_value ) { 457 457 $comment_ids = $this->get_comment_ids(); … … 464 464 'found_comments' => $this->found_comments, 465 465 ); 466 wp_cache_ add( $cache_key, $cache_value, 'comment-queries');466 wp_cache_set_salted( $cache_key, $cache_value, 'comment-queries', $last_changed ); 467 467 } else { 468 468 $comment_ids = $cache_value['comment_ids']; … … 1045 1045 $cache_keys = array(); 1046 1046 foreach ( $_parent_ids as $parent_id ) { 1047 $cache_keys[ $parent_id ] = "get_comment_child_ids:$parent_id:$key :$last_changed";1048 } 1049 $cache_data = wp_cache_get_multiple ( array_values( $cache_keys ), 'comment-queries');1047 $cache_keys[ $parent_id ] = "get_comment_child_ids:$parent_id:$key"; 1048 } 1049 $cache_data = wp_cache_get_multiple_salted( array_values( $cache_keys ), 'comment-queries', $last_changed ); 1050 1050 foreach ( $_parent_ids as $parent_id ) { 1051 1051 $parent_child_ids = $cache_data[ $cache_keys[ $parent_id ] ]; … … 1081 1081 $data = array(); 1082 1082 foreach ( $parent_map as $parent_id => $children ) { 1083 $cache_key = "get_comment_child_ids:$parent_id:$key :$last_changed";1083 $cache_key = "get_comment_child_ids:$parent_id:$key"; 1084 1084 $data[ $cache_key ] = $children; 1085 1085 } 1086 wp_cache_set_multiple ( $data, 'comment-queries');1086 wp_cache_set_multiple_salted( $data, 'comment-queries', $last_changed ); 1087 1087 } 1088 1088
Note: See TracChangeset
for help on using the changeset viewer.