+ $GLOBALS['wp_object_cache'] = new WP_Object_Cache();
+}
+
+/**
+ * Replaces the contents of the cache with new data.
+ *
+ * @since 2.0.0
+ *
+ * @global WP_Object_Cache $wp_object_cache
+ *
+ * @param int|string $key What to call the contents in the cache
+ * @param mixed $data The contents to store in the cache
+ * @param string $group Where to group the cache contents
+ * @param int $expire When to expire the cache contents
+ * @return bool False if not exists, true if contents were replaced
+ */
+function wp_cache_replace( $key, $data, $group = '', $expire = 0 ) {
+ global $wp_object_cache;
+
+ return $wp_object_cache->replace( $key, $data, $group, (int) $expire );
+}
+
+/**
+ * Saves the data to the cache.
+ *
+ * @since 2.0.0
+ *
+ * @global WP_Object_Cache $wp_object_cache
+ *
+ * @param int|string $key What to call the contents in the cache
+ * @param mixed $data The contents to store in the cache
+ * @param string $group Where to group the cache contents
+ * @param int $expire When to expire the cache contents
+ * @return bool False on failure, true on success
+ */
+function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {