[wp-trac] [WordPress Trac] #21434: Don't obliterate the object cache in switch_to_blog()

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 30 13:59:41 UTC 2012


#21434: Don't obliterate the object cache in switch_to_blog()
-------------------------+-----------------------
 Reporter:  ryan         |       Owner:  ryan
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  3.5
Component:  Cache        |     Version:  3.4.1
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+-----------------------

Comment (by ryan):

 Replying to [comment:4 convissor]:
 > The new, efficient code for switching between blogs is an excellent
 improvement.  Thanks.
 >
 > Can you please elaborate on the reasoning behind deprecating
 {{{wp_cache_reset()}}} / {{{WP_Object_Cache::reset()}}} and why the
 deprecation message instructs people to use
 > {{{wp_cache_switch_to_blog()}}} / {{{switch_to_blog()}}}?  The
 {{{reset()}}} and {{{switch_to_blog()}}} methods serve two separate
 purposes.  (Though some people may have used them in conjunction.)

 wp_cache_reset() was only ever implemented by the default, built-in cache.
 The other backends did not implement it. Now that we have switch_to_blog()
 it is even more useless since core never calls it.

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


More information about the wp-trac mailing list