Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
WP Plugins
Redis Object Cache
Commits
83cd8e87
Commit
83cd8e87
authored
Feb 27, 2014
by
Erick Hitter
Browse files
Match function order to Core's template and add a function that Core has but we're missing.
parent
58bfdb6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
object-cache.php
View file @
83cd8e87
...
...
@@ -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 ) {
}
/**
* S
ets up Object Cache Global and assigns
i
t
.
* S
witch the interal blog
i
d
.
*
* @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.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment