WordPress.org

Make WordPress Core

Changeset 4859


Ignore:
Timestamp:
02/02/2007 12:00:36 AM (13 years ago)
Author:
ryan
Message:

Cache user id instead of full user object in the userlogins cache. Props charleshooper. fixes #3716

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r4516 r4859  
    9797
    9898    wp_cache_add($user_id, $user, 'users');
    99     wp_cache_add($user->user_login, $user, 'userlogins');
    100 
     99    wp_cache_add($user->user_login, $user_id, 'userlogins');
    101100    return $user;
    102101}
     
    117116        return false;
    118117
    119     $userdata = wp_cache_get($user_login, 'userlogins');
     118    $user_id = wp_cache_get($user_login, 'userlogins');
     119    $userdata = wp_cache_get($user_id, 'users');
     120
    120121    if ( $userdata )
    121122        return $userdata;
     
    148149
    149150    wp_cache_add($user->ID, $user, 'users');
    150     wp_cache_add($user->user_login, $user, 'userlogins');
    151 
     151    wp_cache_add($user->user_login, $user->ID, 'userlogins');
    152152    return $user;
    153153
  • trunk/wp-includes/version.php

    r4856 r4859  
    44
    55$wp_version = '2.2-bleeding';
    6 $wp_db_version = 4774;
     6$wp_db_version = 4859;
    77
    88?>
Note: See TracChangeset for help on using the changeset viewer.