Changeset 54780
- Timestamp:
- 11/09/2022 06:33:01 PM (18 months ago)
- Location:
- branches/6.1
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/6.1
-
branches/6.1/src/wp-includes/class-wp-query.php
r54692 r54780 3104 3104 * search, that to ensure against a collision with another 3105 3105 * function. 3106 * 3107 * If `$fields` has been modified by the `posts_fields`, 3108 * `posts_fields_request`, `post_clauses` or `posts_clauses_request` 3109 * filters, then caching is disabled to prevent caching collisions. 3106 3110 */ 3107 3111 $id_query_is_cacheable = ! str_contains( strtoupper( $orderby ), ' RAND(' ); 3112 3113 $cachable_field_values = array( 3114 "{$wpdb->posts}.*", 3115 "{$wpdb->posts}.ID, {$wpdb->posts}.post_parent", 3116 "{$wpdb->posts}.ID", 3117 ); 3118 3119 if ( ! in_array( $fields, $cachable_field_values, true ) ) { 3120 $id_query_is_cacheable = false; 3121 } 3122 3108 3123 if ( $q['cache_results'] && $id_query_is_cacheable ) { 3109 3124 $new_request = str_replace( $fields, "{$wpdb->posts}.*", $this->request );
Note: See TracChangeset
for help on using the changeset viewer.