Opened 8 years ago
Last modified 7 years ago
#40362 new defect (bug)
Remove `blog-id-cache` cache group
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | has-patch 2nd-opinion |
Focuses: | multisite | Cc: |
Description
The function get_blog_id_from_url()
is the only function that uses the old blog-id-cache
group. Since the introduction of WP_Site_Query
it's basically redundant in there though, since site query results are cached anyway.
Therefore I think we should remove the cache read and write actions in that function. We can then also remove the cache group completely (from clean_blog_cache()
and registration as a "global group").
Attachments (1)
Change History (8)
This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.
8 years ago
This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.
8 years ago
#5
@
8 years ago
- Keywords 2nd-opinion added; dev-feedback removed
Per bug-scrub discussion:
Maybe we should hold off removing that cache, although it's redundant. That is because WP_Site_Query
caches are invalidated on every change to any site (via last_changed
), while blog-id-cache
keys are only invalidated on updates to the specific site. So the blog-id-cache
keys are much more "stable".
I'm not sure whether this is actually a reason to hold off, but we need to discuss and further investigate.
My patch removes uses of the group in core and in tests. I have removed the global group, as plugins may be using it for something.
I believe we should be getting rid of the all cache look ups that use domain / path. I believe most domain mapping solutions out there will break the cache invalidation.