[buddypress-trac] [BuddyPress Trac] #7595: Use WP_User::get_data_by in BP_Core_User::get_core_userdata (remove custom user object cache)

buddypress-trac noreply at wordpress.org
Wed Sep 27 10:24:11 UTC 2017


#7595: Use WP_User::get_data_by in BP_Core_User::get_core_userdata (remove custom
user object cache)
------------------------------+------------------------------
 Reporter:  johnjamesjacoby   |       Owner:  johnjamesjacoby
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  3.0
Component:  Members           |     Version:  1.2
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |
------------------------------+------------------------------
Changes (by johnjamesjacoby):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"11705"]:
 {{{
 #!CommitTicketReference repository="" revision="11705"
 Members: trust `WP_User::get_data_by()` and eliminate an additional user
 cache layer.

 This change removes ye olde `bp_core_userdata_` cache key system, relying
 100% on the baked-in object cache for user data and improving the
 liklihood of cache hits (particularly when other membership or community
 plugins are looking for user data outside of a BuddyPress specific
 context.)

 For example, bbPress will look for authors of topics and latest posts on
 various forum pages, but BuddyPress will want to make sure it's XProfile
 Field display names are used. Previous to now, BuddyPress would need to
 re-query for these users and keep a separate cache of them. By relying on
 the traditional user objects, those duplicate database queries never
 happen, resulting in much joy.

 This additionally improves page performance throughout the entire
 application. When user accounts are updated (via XProfile or related) and
 then immediately prime their caches, there is no more secondary
 BuddyPress-specific user object cache to prime.

 Fixes #7595.
 }}}

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


More information about the buddypress-trac mailing list