Make WordPress Core


Ignore:
Timestamp:
02/14/2012 03:09:35 PM (13 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/pluggable.php

    r19801 r19918  
    140140    global $wpdb;
    141141
    142     $clean = array();
    143     foreach ( $user_ids as $id ) {
    144         $id = (int) $id;
    145         if ( !wp_cache_get( $id, 'users' ) ) {
    146             $clean[] = $id;
    147         }
    148     }
     142    $clean = _get_non_cached_ids( $user_ids, 'users' );
    149143
    150144    if ( empty( $clean ) )
Note: See TracChangeset for help on using the changeset viewer.