[buddypress-trac] [BuddyPress Trac] #5128: Move user and group last_activity out of wp_usermeta

buddypress-trac noreply at wordpress.org
Wed Apr 30 17:22:23 UTC 2014


#5128: Move user and group last_activity out of wp_usermeta
-------------------------------------+---------------------
 Reporter:  boonebgorges             |       Owner:
     Type:  enhancement              |      Status:  closed
 Priority:  high                     |   Milestone:  2.0
Component:  Core                     |     Version:
 Severity:  major                    |  Resolution:  fixed
 Keywords:  has-patch needs-testing  |
-------------------------------------+---------------------

Comment (by boonebgorges):

 In [changeset:"8332"]:
 {{{
 #!CommitTicketReference repository="" revision="8332"
 Overhaul caching for user last_activity values

 The last_activity methods in the BP_Core_User class were originally
 designed
 without persistent caching in mind. In r8047, some minimal caching support
 was
 introduced, but it was tacked on and incomplete. In particular, it
 depended
 on an inconsistent structure of return values from the last_activity
 methods.
 See #5128 for more background.

 This changeset introduces a number of changes that make last_activity
 methods
 perform more consistently, as well as full support for object caching.

 - BP_Core_User::get_last_activity() always returns a multidimensional
 array
   of last_activity arrays, keyed by user_id. This remains true even when
   last_activity data is being fetched only for a single user.
 - last_activity data is stored in the bp_last_activity cache bucket
 without
   the user-id-keyed wrapper.
 - BP_Core_User::get_last_activity() now uses the same caching technique as
   other BuddyPress and WordPress queries: detect which requested items are
 not
   yet in the cache, prime the cache for those items, and then fetch all
   requested values directly from the cache to build a return value.

 Fixes #5590

 Props imath, johnjamesjacoby for initial patches
 }}}

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


More information about the buddypress-trac mailing list