Make WordPress Core


Ignore:
Timestamp:
02/14/2012 03:09:35 PM (14 years ago)
Author:
ryan
Message:

Split the main WP_Query posts query into two queries to avoid temp tables. Leverage cache to avoid second query in persistent cache environments. Props scribu, cheald, prettyboymp. see #18536

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-thumbnail-template.php

    r19750 r19918  
    6565
    6666    if ( ! empty ( $thumb_ids ) ) {
    67         get_posts( array(
    68                 'update_post_term_cache' => false,
    69                 'include' => $thumb_ids,
    70                 'post_type' => 'attachment',
    71                 'post_status' => 'inherit',
    72                 'nopaging' => true
    73         ) );
     67        _prime_post_caches( $thumb_ids, false, true );
    7468    }
    7569
Note: See TracChangeset for help on using the changeset viewer.