[buddypress-trac] [BuddyPress Trac] #5350: Caching for the activity component

buddypress-trac noreply at wordpress.org
Thu Jan 30 02:38:17 UTC 2014


#5350: Caching for the activity component
-------------------------------------+------------------
 Reporter:  boonebgorges             |       Owner:
     Type:  task                     |      Status:  new
 Priority:  normal                   |   Milestone:  2.0
Component:  Activity                 |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------
Changes (by boonebgorges):

 * keywords:   => has-patch needs-testing
 * milestone:  Future Release => 2.0


Comment:

 5350.patch adds caching for individual activity data. Details:

 - I'm only accessing the cache in `BP_Activity_Activity::get()` and in
 `BP_Activity_Activity::populate()`. This covers probably 95% of all
 activity queries in BuddyPress. (The activity component is probably the
 best of our components at channeling queries through a single point like
 this. Others will be more challenging.)
 - As described above: after the activity IDs are fetched, I check the
 cache for each one. If found, the cached data is used. If there are items
 for which cached data is *not* found, we run a query only for those items'
 data, and fill in the $activities array with it.
 - Activity item caches are busted on activity save and delete.

 All my test with APC are showing that this is working properly (cache is
 being used when it should be, not used when it shouldn't be, and
 invalidated at the right times). Could use a second pair of eyes, though.

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


More information about the buddypress-trac mailing list