[wp-trac] [WordPress Trac] #15458: Lazy-load usermeta into the user object
WordPress Trac
wp-trac at lists.automattic.com
Sun Aug 7 02:05:42 UTC 2011
#15458: Lazy-load usermeta into the user object
-------------------------------------+------------------
Reporter: nacin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.3
Component: Performance | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+------------------
Comment (by ryan):
{{{
$this->caps = &$this->data->{$this->cap_key};
}}}
That line in WP_User::_init_caps() is somehow causing cache pollution.
wp_cache_get($id, 'users'), as done in get_userdata(), will sometimes
return an object with the wp_xxx_capabilities property set ( where xxx is
the current blog id). The value is an empty array. This confuses
get_blogs_of_user(), which sees that the property is set and mistakenly
thinks the user belong to the current blog. Since the cache clones
objects on set and get this is rather unexpected.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15458#comment:42>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list