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

buddypress-trac noreply at wordpress.org
Mon Nov 3 00:34:14 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           |  Resolution:
 Keywords:  has-patch        |
-----------------------------+------------------

Comment (by boonebgorges):

 > And we do make quite a few calls to bp_get_user_meta() that (without
 access to the code at the moment) I assume boil back down to a cached user
 object

 If this is true, then yes, we should probably cache it. Your best resource
 here will be SAVEQUERIES: if you turn on all_with_meta, load the user
 directory, and see an extra 20 database queries, you'll know that we don't
 need the extra data. It's also worth remembering that user_login,
 user_nicename, and user_email will be cached by `WP_User`, and IIRC they
 are the only values that we regularly need in the loop. But all of this
 should of course be driven by metrics, so thanks for looking into it more
 deeply!

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


More information about the buddypress-trac mailing list