[buddypress-trac] [BuddyPress Trac] #5328: Use of the WordPress HeartBeat API to check for newest activities and to let user load them

buddypress-trac noreply at wordpress.org
Wed Feb 19 13:43:25 UTC 2014


#5328: Use of the WordPress HeartBeat API to check for newest activities and to
let user load them
-------------------------------------------------+-----------------------
 Reporter:  imath                                |       Owner:  imath
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  2.0
Component:  Activity                             |     Version:  1.9.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion needs-testing  |
-------------------------------------------------+-----------------------

Comment (by boonebgorges):

 Hey imath - Looking better. I like the new technique of using the activity
 loop inside of an output buffer. A couple smallish comments:

 - You're caching both the latest activity *id* and the *markup*. When you
 cache the markup, it makes invalidation more complicated: you should be
 deleting this cache when the 'activity' slug is changed, when the activity
 user updates his display name, etc etc. For simplicity's sake, I'd
 recommend caching the latest activity ID only. The additional overhead
 required to fetch the activity data is pretty minor, and it'll only happen
 when there's actual new activity to fetch.
 - The new `$filter['id']` param is confusingly named, IMO. How about
 'offset' instead of 'id'?
 - Can we add '_bp_enable_heartbeat_refresh' to `bp_get_default_options()`?
 This'll help us to avoid cache misses when the setting has not been set;
 see #5385
 - Given that the heartbeat interval is shared by all plugins, I think we
 shouldn't mess with it. We should, however, add a page to the codex about
 the feature, and explain how the interval can be made longer or shorter.

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


More information about the buddypress-trac mailing list