[wp-trac] [WordPress Trac] #14992: When Object Caching is enabled switch_to_blog causes issues with some functions

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 29 20:12:48 UTC 2010


#14992: When Object Caching is enabled switch_to_blog causes issues with some
functions
---------------------------+------------------------------------------------
 Reporter:  simonwheatley  |       Owner:                 
     Type:  defect (bug)   |      Status:  new            
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Multisite      |     Version:                 
 Severity:  major          |    Keywords:  dev-feedback   
---------------------------+------------------------------------------------

Comment(by prettyboymp):

 Replying to [comment:7 Denis-de-Bernardy]:
 > Imho, this would be a bug in the object cache implementations. They
 should key things based on the blog ID, i.e.:
 >
 > {{{
 > $this->cache[$blog_id][$key]
 > }}}
 >
 > vs:
 >
 > {{{
 > $this->cache[$key]
 > }}}
 >
 > The built-in, memory-based object cache should do the same to set the
 example.

 So at this point, we just need a core members decision whether we want to
 tackle this by making it a requirement for cache implementations to also
 key by blog_id and lose the wp_cache_reset() and wp_cache_init() calls
 after the initial load OR if we just call a wp_cache_reset() method if it
 exists when the blog_id changes.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14992#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list