[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
Sat Mar 2 22:00:55 UTC 2013
#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:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.6
Component: Cache | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+------------------
Changes (by ethitter):
* keywords: => has-patch needs-testing
Comment:
@stevenkword and I worked on
[http://core.trac.wordpress.org/attachment/ticket/23290/23290.patch
23290.patch] during the Boston WP Hack Day.
We introduced a `get_non_persistent_groups()` method in Core's
`WP_Object_Cache` to handle the core use, and to be implemented by authors
of object cache drop ins. Initially we tried to include universal support
for getting the non-persistent cache groups, but review of the APC Object
Caching plugin revealed that the structure of `$global_groups` can vary
between persistent backends.
The switching fallback that was present in `switch_to_blog()` and
`restore_current_blog()` was abstracted into `_ms_cache_switch_fallback()`
for consistency, and logic to use the persistent group getter closely
mirrors the handling of global groups already in those functions.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23290#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list