Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

#4226 closed defect (bug) (fixed)

Member's group / friends totals incorrect on memcached

Reported by: djpaul's profile DJPaul Owned by: djpaul's profile DJPaul
Milestone: 1.6 Priority: normal
Severity: major Version: 1.2
Component: Members Keywords:
Cc:

Description

When memcached, if a user joins a group, the group joined total in the subnav is incorrect, and stays incorrect, until memcached is flushed. This affects 1.2 all the way up to trunk.

The same problem happens for the number of friends count in the subnav, and I'd suspect the other counts might have the same problem, but I have not tested these.

Attachments (1)

2012-05-31 04.40.58 pm.png (57.2 KB) - added by DJPaul 13 years ago.
problem

Download all attachments as: .zip

Change History (7)

@DJPaul
13 years ago

problem

#1 follow-up: @shanebp
13 years ago

I've confirmed that we have memcached and apc installed and working.

I did not install http://wordpress.org/extend/plugins/apc/ or any other caching plugins.

I cannot recreate this problem on a trunk-6068 install.

Last edited 13 years ago by shanebp (previous) (diff)

#2 in reply to: ↑ 1 @r-a-y
13 years ago

Replying to shanebp:

I've confirmed that we have memcached and apc installed and working.

I did not install http://wordpress.org/extend/plugins/apc/ or any other caching plugins.

I cannot recreate this problem on a trunk-6068 install.

I'm guessing that DJPaul has an object caching plugin installed like this one. You need to have an object cache plugin installed for persistent caching to take effect in WP/BP.

#3 @shanebp
13 years ago

Ok, installed http://wordpress.org/extend/plugins/apc/
and now I can confirm this bug on a trunk-6068 install.
I see the bug on Groups and Friends, joining and leaving.

On a production site using BP 1.5.5 and W3 Total Cache with object cache enabled,
I can confirm this bug.
Emptying the object cache via wp-admin results in the subnav showing the correct number.

Last edited 13 years ago by shanebp (previous) (diff)

#4 @DJPaul
13 years ago

  • Owner set to DJPaul
  • Status changed from new to assigned

#5 @djpaul
13 years ago

(In [6100]) When a group is created or deleted, clear each group member's "total groups count" cache.
Addresses a bug where the counts never changed in an environment with a persistent object cache.

  • See #4226
  • Specify cache group for to wp_cache_delete() in groups_clear_group_user_object_cache().
  • Add $user_ids parameter to the 'bp_groups_delete_group' action to save a repeat DB query later.
  • Add $group object parameter to the 'groups_created_group' action.

#6 @djpaul
13 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6101]) Prevent a user's "total friends" count from not being cleared from a persistent object cache.

  • Removed redundant BP wp_cache use as WP user meta has its own caching built-in.
  • Fixes #4226
Note: See TracTickets for help on using tickets.