[wp-trac] [WordPress Trac] #23290: When using switch_to_blog() with a persistent object cache that lacks wp_cache_switch_to_blog() support, non-persistent groups are not maintained

WordPress Trac noreply at wordpress.org
Fri Feb 6 03:12:24 UTC 2026


#23290: When using switch_to_blog() with a persistent object cache that lacks
wp_cache_switch_to_blog() support, non-persistent groups are not maintained
-------------------------------------+------------------------------
 Reporter:  markjaquith              |       Owner:  johnjamesjacoby
     Type:  defect (bug)             |      Status:  assigned
 Priority:  low                      |   Milestone:  7.0
Component:  Cache API                |     Version:  3.0
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  multisite
-------------------------------------+------------------------------
Changes (by johnjamesjacoby):

 * keywords:  has-patch needs-unit-tests needs-refresh => has-patch needs-
     testing
 * owner:  (none) => johnjamesjacoby
 * status:  new => assigned
 * milestone:   => 7.0


Comment:

 23290-2.patch does the following:

 - Introduces a new `wp_cache_switch_to_blog_fallback()` function in `ms-
 blogs.php` that only gets called when `wp_cache_switch_to_blog()` does not
 exist
 - Adds multisite tests for `wp_cache_switch_to_blog_fallback()` for
 defaults, custom groups, edge cases, and some integration scenarios

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/23290#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list