Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#6127 closed defect (bug) (fixed)

bp_activity_sitewide_front cache should be cleared when an activity is updated

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 2.2 Priority: normal
Severity: normal Version:
Component: Activity Keywords: has-patch 2nd-opinion
Cc:

Description

While working on unit tests for #6119, i've noticed that when an activity was updated and this activity was on the first page of the activity list, i was getting the activity unchanged.

bp_activity_sitewide_front cache is cleared when an activity is deleted, marked as ham/spam but not when updated. I think we should also clear it in case an activity has been updated.

Attachments (2)

6127.patch (546 bytes) - added by imath 10 years ago.
6127.unittest.patch (1.2 KB) - added by imath 10 years ago.

Download all attachments as: .zip

Change History (6)

@imath
10 years ago

#1 @DJPaul
10 years ago

  • Keywords needs-unit-tests added

#2 @DJPaul
10 years ago

Agree. I am not too worried about the unit test but if it is quick to build one, it would be nice to have it. I suspect we don't have unit tests for all the other instances of this cache clearing that you listed in the ticket description; i'm not worried about those for now.

#3 @imath
10 years ago

  • Keywords needs-unit-tests removed

6127.unittest.patch only include the unit test. It fails if 6127.patch is not apply, it succeed otherwise ;)

#4 @imath
10 years ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 9367:

Make sure the cached activities first page is cleared when an item is updated

In case one of the activities of the first page is edited, we need to clear the bp_activity_sitewide_front cache so that the stream is refreshed with the latest version of the edited activity.

Fixes #6127

Note: See TracTickets for help on using tickets.