[buddypress-trac] [BuddyPress Trac] #5434: Improvements to object caching in bp-activity
    buddypress-trac 
    noreply at wordpress.org
       
    Tue Mar  4 22:47:12 UTC 2014
    
    
  
#5434: Improvements to object caching in bp-activity
-------------------------+------------------
 Reporter:  r-a-y        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  2.0
Component:  Activity     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------
Comment (by aaclayton):
 I'll try to keep digging, but I'm 100% sure it's a caching related issue.
 When I retrieve activity comments from `wp_cache_get( $activity_id,
 'bp_activity_comments' )` in the get_activity_comments function it is
 pulling a cached set of comments which does not include new comment
 submissions. If I replace this line with `$comments = false;` to bypass
 caching the issue is resolved.
 I verified this on some of the default WordPress themes for my
 installation, so it's not a theme-specific issue.
 The problem seems to be happening in the bp_activity_new_comment()
 function. I've looked at the source and `wp_cache_delete( $parent_id,
 'bp_activity_comments' );` should be invalidating that cached entry, but
 for some reason it is not. If I precede that line with a
 `wp_cache_flush()` for some heavyhanded testing it also fixes the problem.
 I'm not sure why the wp_cache_delete in line 1244 does not invalidate the
 cache...but for some reason (at least on my installation) it is not.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5434#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
    
    
More information about the buddypress-trac
mailing list