From 5a1f1bd68538af139acc8d5867b9639835a30543 Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 15 May 2010 15:00:53 +0000 Subject: [PATCH] Don't update_post_caches if a persistent object cache is installed. fixes #12611 git-svn-id: http://svn.automattic.com/wordpress/trunk@14665 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 1999261a7..afa38f3af 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1600,7 +1600,7 @@ class WP_Query { * @return array List of posts. */ function &get_posts() { - global $wpdb, $user_ID; + global $wpdb, $user_ID, $_wp_using_ext_object_cache; do_action_ref_array('pre_get_posts', array(&$this)); @@ -1629,8 +1629,12 @@ class WP_Query { if ( !isset($q['suppress_filters']) ) $q['suppress_filters'] = false; - if ( !isset($q['cache_results']) ) - $q['cache_results'] = true; + if ( !isset($q['cache_results']) ) { + if ( $_wp_using_ext_object_cache ) + $q['cache_results'] = false; + else + $q['cache_results'] = true; + } if ( !isset($q['update_post_term_cache']) ) $q['update_post_term_cache'] = true;