Opened 9 years ago
Closed 9 years ago
#2800 closed defect (bug) (fixed)
Clean topic/reply post cache on certain actions
Reported by: | thebrandonallen | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | trunk |
Component: | API - Cache | Keywords: | has-patch |
Cc: |
Description
When working with counts, our caching layer causes some counts to be out of sync. Included patch remedies this situation.
This patch goes along with the improved count tests I'm adding to another ticket. I'll link to it when I've created it.
Attachments (2)
Change History (7)
This ticket was mentioned in Slack in #bbpress by thebrandonallen. View the logs.
9 years ago
#3
@
9 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Attached patch does two things:
1) Condenses the majority of our bbp_clean_post_cache
actions onto WP's clean_post_cache
hook.
2) Reworks bbp_clean_post_cache()
to function better with the post type agnostic clean_post_cache
hook.
The result is that our current tests pass without having to manually call bbp_clean_post_cache()
, and all of our factory create methods now have cache clearing built in. All of our existing tests continue to pass.
As our test base builds up, we should probably audit the other areas where we're calling bbp_clean_post_cache
, either directly or via hook. We may be able to remove some of them.
Fixed in r5733. See #2801.