#41815 closed defect (bug) (fixed)
switch_to_blog() docs incorrectly state that autoloaded options aren't switched
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Cache API | Keywords: | good-first-bug has-patch |
Focuses: | docs, multisite | Cc: |
Description
The inline docs for switch_to_blog()
include this:
* Things that aren't switched: * - autoloaded options. See #14992 * - plugins. See #14941
The statement that autoloaded options aren't switched was added to the docs in [15676], as suggested in 14992#comment:2. However, #14992 was later closed as worksforme, having been apparently fixed in the intervening time, via #21434 and other changes. The autoloaded options cache should now always be switched even when using a persistent caching plugin, since modern drop-ins should be implementing wp_cache_switch_to_blog()
.
As such, the statement that autoloaded options aren't switched doesn't appear to be accurate any longer, and should be removed. Or at the very least, it should be clarified to say that this is only a legacy issue with some persistent caching implementations.
Attachments (1)
Change History (8)
#2
@
8 years ago
- Keywords has-patch added
Here it is. Created as part of virtual contrib2core workshop. https://www.meetup.com/The-Ottawa-WordPress-Group/events/242253849/
#3
@
8 years ago
- Milestone changed from Awaiting Review to 4.9
- Owner set to jeremyfelt
- Status changed from new to reviewing
Good catch, as of [21403], the blog ID was added to the cache key for multisite installs.
Thanks for the patch @stevepuddick!
#5
@
8 years ago
This ticket patch as patch of Virtual Contrib 2 core Meetup
https://www.youtube.com/watch?v=xoQkp_aZzfE
https://www.meetup.com/The-Ottawa-WordPress-Group/events/242253849/
https://www.meetup.com/WPToronto/events/243121890/
line removed