Changeset 54352 for trunk/src/wp-includes/class-wp-query.php
- Timestamp:
- 09/29/2022 10:07:34 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r54133 r54352 3100 3100 } 3101 3101 3102 $cache_key = "wp_query:$key:$last_changed";3103 3102 $cache_key = "wp_query:$key:$last_changed"; 3103 $cache_found = false; 3104 3104 if ( null === $this->posts ) { 3105 $cached_results = wp_cache_get( $cache_key, 'posts' );3105 $cached_results = wp_cache_get( $cache_key, 'posts', false, $cache_found ); 3106 3106 3107 3107 if ( $cached_results ) { … … 3257 3257 } 3258 3258 3259 if ( $q['cache_results'] && $id_query_is_cacheable ) {3259 if ( $q['cache_results'] && $id_query_is_cacheable && ! $cache_found ) { 3260 3260 $post_ids = wp_list_pluck( $this->posts, 'ID' ); 3261 3261 … … 3456 3456 3457 3457 if ( $q['cache_results'] ) { 3458 update_post_caches( $this->posts, $post_type, $q['update_post_term_cache'], $q['update_post_meta_cache'] ); 3458 $post_ids = wp_list_pluck( $this->posts, 'ID' ); 3459 _prime_post_caches( $post_ids, $q['update_post_term_cache'], $q['update_post_meta_cache'] ); 3459 3460 } 3460 3461
Note: See TracChangeset
for help on using the changeset viewer.