[buddypress-trac] [BuddyPress Trac] #5979: `bp_core_userdata_` cache is unnecessary

buddypress-trac noreply at wordpress.org
Sun Nov 2 20:51:31 UTC 2014


#5979: `bp_core_userdata_` cache is unnecessary
-----------------------------+-------------------------
 Reporter:  johnjamesjacoby  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  high             |  Milestone:  2.2
Component:  Members          |    Version:
 Severity:  normal           |   Keywords:  2nd-opinion
-----------------------------+-------------------------
 A note in `bp-core-classes.php` incorrectly states that:

 {{{
 // WP_User_Query doesn't cache the data it pulls from wp_users,
 // and it does not give us a way to save queries by fetching
 // only uncached users. However, BP does cache this data, so
 // we set it here.
 }}}

 `WP_User_Query` does cache data pulled from `wp_users` via calls to
 `WP_User` for each queried result. `WP_User::get_user_by` gets from and
 sets each user object as needed.

 Our judicious use of `bp_core_get_core_userdata()` helps act as a funnel
 for calls to deeper methods, so our abstraction will help keep any fixes
 relatively small and low-impact.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5979>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list