#6596 closed defect (bug) (no action required)
bp_notifications_mark_notification not clearing cache
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Core | Keywords: | reporter-feedback |
| Cc: | th.lhotta@… |
Description
Because bp_notifications_mark_notification does not pass the user ID in $where_args to BP_Notifications_Notification::update the notification cache is not cleared. This is a problem when using persistent object caches as it means the cache has to be cleared manually.
Additionally the doc of bp_notifications_mark_notification seems to be wrong as the $id parameter is the notification ID and not the user ID.
Attachments (1)
Change History (7)
#3
@
10 years ago
- Keywords reporter-feedback added
thomaslhotta - Thanks for the report. I've fixed the documentation issue in [10055].
I can't reproduce the cache problem you're reporting. See bp_notifications_clear_all_for_user_cache_before_update(). It's true that, in this case, no 'user_id' is passed. But this means that the elseif ( ! empty( $where_args['id'] ) ) clause is triggered, which also clears the user cache. See 6596.diff for a unit test.
In 10055: