[wp-trac] [WordPress Trac] #15458: Lazy-load usermeta into the user object
WordPress Trac
wp-trac at lists.automattic.com
Sun Aug 7 02:30:40 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):
> Those lines in WP_User::_init_caps() are 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 belongs to the current blog. Since the cache
clones objects on set and get this is rather unexpected. Removing the ref
assignment avoids the problem.
Tracked this down to a bug in a particular memcached backend. The value
was being properly cloned from the cache during get but then that clone
was assigned right back into the cache. Dumb. Anyhow, not a core bug so
disregard the previous comment.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15458#comment:43>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list