Skip to content
Snippets Groups Projects
Commit 83cd8e87 authored by Erick Hitter's avatar Erick Hitter
Browse files

Match function order to Core's template and add a function that Core has but we're missing.

parent 58bfdb6e
Branches
Tags
No related merge requests found
......@@ -108,6 +108,17 @@ function wp_cache_incr( $key, $offset = 1, $group = '' ) {
return $wp_object_cache->increment( $key, $offset, $group );
}
/**
* Sets up Object Cache Global and assigns it.
*
* @global WP_Object_Cache $wp_object_cache WordPress Object Cache
* @return void
*/
function wp_cache_init() {
global $wp_object_cache;
$wp_object_cache = new WP_Object_Cache();
}
/**
* Replaces a value in cache.
*
......@@ -146,15 +157,19 @@ function wp_cache_set( $key, $value, $group = '', $expiration = 0 ) {
}
/**
* Sets up Object Cache Global and assigns it.
* Switch the interal blog id.
*
* @global WP_Object_Cache $wp_object_cache WordPress Object Cache
* @return void
* This changes the blog id used to create keys in blog specific groups.
*
* @since 3.5.0
*
* @param int $blog_id Blog ID
*/
function wp_cache_init() {
global $wp_object_cache;
$wp_object_cache = new WP_Object_Cache();
}
// function wp_cache_switch_to_blog( $blog_id ) {
// global $wp_object_cache;
// return $wp_object_cache->switch_to_blog( $blog_id );
// }
/**
* Adds a group or set of groups to the list of Redis groups.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment