Don't obliterate the object cache in switch_to_blog()
|Reported by:||ryan||Owned by:||ryan|
switch_to_blog() calls wp_cache_init() which destroys the current $wp_object_cache object and creates a new one. This can be really expensive, especially with the non-persistent default cache. Instead of reinitializing, let's introduce something like wp_cache_switch_to_blog(). The memcached backend already builds the blog id into keys not in global groups, making ::switch_to_blog() very easy to implement. The default cache can do the same (I think it was keyed by blog id once upon a time).