[buddypress-trac] [BuddyPress Trac] #6445: Notifications: Invalidate cache when updating a notification
buddypress-trac
noreply at wordpress.org
Thu May 21 19:57:00 UTC 2015
#6445: Notifications: Invalidate cache when updating a notification
---------------------------------------+------------------------------
Reporter: r-a-y | Owner: johnjamesjacoby
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 2.3
Component: Component - Notifications | Version: 1.9
Severity: normal | Resolution: fixed
Keywords: has-patch |
---------------------------------------+------------------------------
Changes (by johnjamesjacoby):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9887"]:
{{{
#!CommitTicketReference repository="" revision="9887"
Notifications: Improve `all_for_user` cache deletion.
* Introduce `bp_notification_before_update` action which fires before a
Notification is updated
* Introduce `bp_notifications_clear_all_for_user_cache()` as wrapper for
`wp_cache_delete()` with appropriate cache group and key
* Introduce `bp_notifications_clear_all_for_user_cache_before_update()`
hooked to `bp_notification_before_update` action, to handle cache deletion
before a notification is updated
This change fixes a bug where marking single notifications as read/unread
would not show anticipated results, as the `all_for_user` cache was not
being properly cleared.
Props r-a-y. Fixes #6445.
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6445#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list