Opened 14 years ago
Closed 12 years ago
#15361 closed defect (bug) (duplicate)
wp_start_object_cache() should be called within blog switching methods instead of wp_cache_init()
Reported by: | prettyboymp | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Cache API | Keywords: | |
Focuses: | Cc: |
Description
The switch_to_blog() and restore_current_blog() functions call wp_cache_init() directly, which causes the object cache instance to be recreated. These methods should instead be calling the wp_start_object_cache() method which correctly checks whether wp_cache_init() or wp_cache_reset() should be used.
Attachments (1)
Change History (15)
#6
@
14 years ago
- Summary changed from w_start_object_cache() should be called within blog switching methods instead of wp_cache_init() to wp_start_object_cache() should be called within blog switching methods instead of wp_cache_init()
#7
@
14 years ago
We don't really need to re-add global and non-persistent groups or do those file and function exists checks. Maybe switch_to_blog() should directly call wp_cache_reset() if it exists otherwise do wp_cache_init().
Note: See
TracTickets for help on using
tickets.
Related: #14992