#21595 closed defect (bug) (fixed)
get_blog_post() and get_blog_permalink() create duplicate caches that aren't invalidated
Reported by: | ryan | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.4.1 |
Component: | Cache API | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
Both of these copy per blog information to global caches and never invalidate that information when the sources change.
Attachments (4)
Change History (13)
#3
follow-up:
↓ 4
@
12 years ago
Actually, global-posts is invalidated at the end of clean_post_cache() so get_blog_post() isn't as bad as it first seemed.
#4
in reply to:
↑ 3
@
12 years ago
Replying to ryan:
Actually, global-posts is invalidated at the end of clean_post_cache() so get_blog_post() isn't as bad as it first seemed.
We can kill that line now, though. 21595.diff looks good.
#5
@
12 years ago
That removes the invalidation. Those rare third parties who might be relying on that invalidation would have to perform the invalidation themselves on a clean_post_cache hook. I left the registration of global-posts as a global group in for now.
Note: See
TracTickets for help on using
tickets.
get_blog_post() should also use switch_to_blog() like get_blog_permalink().
Persistent caching that we get via switch_to_blog() should be enough, no? The double-caching seems weird.