+ * @param int $blog_id Site ID.
+ */
+function wp_cache_switch_to_blog( $blog_id ) {
+ global $wp_object_cache;
+
+ $wp_object_cache->switch_to_blog( $blog_id );
+}
+
+/**
+ * Adds a group or set of groups to the list of global groups.
+ *
+ * @since 2.6.0
+ *
+ * @see WP_Object_Cache::add_global_groups()
+ * @global WP_Object_Cache $wp_object_cache Object cache global instance.
+ *
+ * @param string|array $groups A group or an array of groups to add.
+ */
+function wp_cache_add_global_groups( $groups ) {
+ global $wp_object_cache;
+
+ $wp_object_cache->add_global_groups( $groups );
+}
+
+/**
+ * Adds a group or set of groups to the list of non-persistent groups.
+ *
+ * @since 2.6.0
+ *
+ * @param string|array $groups A group or an array of groups to add.
+ */
+function wp_cache_add_non_persistent_groups( $groups ) {
+ // Default cache doesn't persist so nothing to do here.
+}
+
+/**
+ * Reset internal cache keys and structures.
+ *
+ * If the cache back end uses global blog or site IDs as part of its cache keys,
+ * this function instructs the back end to reset those keys and perform any cleanup
+ * since blog or site IDs have changed since cache init.
+ *
+ * This function is deprecated. Use wp_cache_switch_to_blog() instead of this
+ * function when preparing the cache for a blog switch. For clearing the cache
+ * during unit tests, consider using wp_cache_init(). wp_cache_init() is not
+ * recommended outside of unit tests as the performance penality for using it is
+ * high.
+ *
+ * @since 2.6.0
+ * @deprecated 3.5.0 WP_Object_Cache::reset()
+ * @see WP_Object_Cache::reset()
+ *
+ * @global WP_Object_Cache $wp_object_cache Object cache global instance.
+ */
+function wp_cache_reset() {
+ _deprecated_function( __FUNCTION__, '3.5.0' );
+
+ global $wp_object_cache;
+
+ $wp_object_cache->reset();
+}
+
+/**
+ * Core class that implements an object cache.
+ *
+ * The WordPress Object Cache is used to save on trips to the database. The
+ * Object Cache stores all of the cache data to memory and makes the cache
+ * contents available by using a key, which is used to name and later retrieve
+ * the cache contents.
+ *
+ * The Object Cache can be replaced by other caching mechanisms by placing files
+ * in the wp-content folder which is looked at in wp-settings. If that file
+ * exists, then this file will not be included.