Ticket #12611: 12611.diff
File 12611.diff, 838 bytes (added by , 15 years ago) |
---|
-
wp-includes/query.php
1597 1597 * @return array List of posts. 1598 1598 */ 1599 1599 function &get_posts() { 1600 global $wpdb, $user_ID ;1600 global $wpdb, $user_ID, $_wp_using_ext_object_cache; 1601 1601 1602 1602 do_action_ref_array('pre_get_posts', array(&$this)); 1603 1603 … … 2507 2507 $this->posts[$i] = sanitize_post($this->posts[$i], 'raw'); 2508 2508 } 2509 2509 2510 // If using an object cache and the number of posts is greater than 20, skip updating the post caches. 2511 if ( $_wp_using_ext_object_cache && $this->post_count > apply_filters('update_post_cache_threshold', 20) ) 2512 $q['cache_results'] = false; 2513 2510 2514 if ( $q['cache_results'] ) 2511 2515 update_post_caches($this->posts, $post_type); 2512 2516