mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
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
git-svn-id: https://develop.svn.wordpress.org/trunk@19918 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -139,13 +139,7 @@ if ( !function_exists('cache_users') ) :
|
||||
function cache_users( $user_ids ) {
|
||||
global $wpdb;
|
||||
|
||||
$clean = array();
|
||||
foreach ( $user_ids as $id ) {
|
||||
$id = (int) $id;
|
||||
if ( !wp_cache_get( $id, 'users' ) ) {
|
||||
$clean[] = $id;
|
||||
}
|
||||
}
|
||||
$clean = _get_non_cached_ids( $user_ids, 'users' );
|
||||
|
||||
if ( empty( $clean ) )
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user