Opened 16 years ago
Closed 14 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: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Cache API | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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
@
16 years ago
- Summary w_start_object_cache() should be called within blog switching methods instead of wp_cache_init() → wp_start_object_cache() should be called within blog switching methods instead of wp_cache_init()
#7
@
16 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Related: #14992