Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WP Plugins
Redis Object Cache
Commits
e838e700
Commit
e838e700
authored
Feb 27, 2014
by
Erick Hitter
Browse files
Rename a function to follow WP Coding Standards
parent
a2edac75
Changes
1
Hide whitespace changes
Inline
Side-by-side
object-cache.php
View file @
e838e700
...
...
@@ -291,7 +291,7 @@ function wp_cache_get_by_key( $server_key, $key, $group = '', $cache_cb = null,
* @link http://www.php.net/manual/en/memcached.getdelayed.php
*
* @param string|array $keys Array or string of key(s) to request.
* @param string|array $groups Array or string of group(s) for the key(s). See build
K
eys for more on how these are handled.
* @param string|array $groups Array or string of group(s) for the key(s). See build
_k
eys for more on how these are handled.
* @param bool $with_cas Whether to request CAS token values also.
* @param null $value_cb The result callback or NULL.
*
...
...
@@ -310,7 +310,7 @@ function wp_cache_get_delayed( $keys, $groups = '', $with_cas = false, $value_cb
*
* @param string $server_key The key identifying the server to store the value on.
* @param string|array $keys Array or string of key(s) to request.
* @param string|array $groups Array or string of group(s) for the key(s). See build
K
eys for more on how these are handled.
* @param string|array $groups Array or string of group(s) for the key(s). See build
_k
eys for more on how these are handled.
* @param bool $with_cas Whether to request CAS token values also.
* @param null $value_cb The result callback or NULL.
*
...
...
@@ -325,7 +325,7 @@ function wp_cache_get_delayed_by_key( $server_key, $keys, $groups = '', $with_ca
/**
* Gets multiple values from memcached in one request.
*
* See the build
K
eys method definition to understand the $keys/$groups parameters.
* See the build
_k
eys method definition to understand the $keys/$groups parameters.
*
* @link http://www.php.net/manual/en/memcached.getmulti.php
*
...
...
@@ -348,7 +348,7 @@ function wp_cache_get_multi( $keys, $groups = '', &$cas_tokens = null, $flags =
/**
* Gets multiple values from memcached in one request by specified server key.
*
* See the build
K
eys method definition to understand the $keys/$groups parameters.
* See the build
_k
eys method definition to understand the $keys/$groups parameters.
*
* @link http://www.php.net/manual/en/memcached.getmultibykey.php
*
...
...
@@ -640,7 +640,7 @@ function wp_cache_set_by_key( $server_key, $key, $value, $group = '', $expiratio
* By sending an array of $items to this function, all values are saved at once to
* memcached, reducing the need for multiple requests to memcached. The $items array
* keys and values are what are stored to memcached. The keys in the $items array
* are merged with the $groups array/string value via build
K
eys to determine the
* are merged with the $groups array/string value via build
_k
eys to determine the
* final key for the object.
*
* @param array $items An array of key/value pairs to store on the server.
...
...
@@ -661,7 +661,7 @@ function wp_cache_set_multi( $items, $groups = '', $expiration = 0 ) {
* By sending an array of $items to this function, all values are saved at once to
* memcached, reducing the need for multiple requests to memcached. The $items array
* keys and values are what are stored to memcached. The keys in the $items array
* are merged with the $groups array/string value via build
K
eys to determine the
* are merged with the $groups array/string value via build
_k
eys to determine the
* final key for the object.
*
* @param string $server_key The key identifying the server to store the value on.
...
...
@@ -833,7 +833,7 @@ class WP_Object_Cache {
* @return bool Returns TRUE on success or FALSE on failure.
*/
public
function
add
(
$key
,
$value
,
$group
=
'default'
,
$expiration
=
0
,
$server_key
=
''
,
$byKey
=
false
)
{
$derived_key
=
$this
->
build
K
ey
(
$key
,
$group
);
$derived_key
=
$this
->
build
_k
ey
(
$key
,
$group
);
// If group is a non-Redis group, save to runtime cache, not Redis
if
(
in_array
(
$group
,
$this
->
no_redis_groups
)
)
{
...
...
@@ -877,7 +877,7 @@ class WP_Object_Cache {
* @return bool Returns TRUE on success or FALSE on failure.
*/
public
function
delete
(
$key
,
$group
=
'default'
,
$time
=
0
,
$server_key
=
''
,
$byKey
=
false
)
{
$derived_key
=
$this
->
build
K
ey
(
$key
,
$group
);
$derived_key
=
$this
->
build
_k
ey
(
$key
,
$group
);
// Remove from no_mc_groups array
if
(
in_array
(
$group
,
$this
->
no_redis_groups
)
)
{
...
...
@@ -921,7 +921,7 @@ class WP_Object_Cache {
* @return bool|mixed Cached object value.
*/
public
function
get
(
$key
,
$group
=
'default'
,
$server_key
=
''
,
$byKey
=
false
)
{
$derived_key
=
$this
->
build
K
ey
(
$key
,
$group
);
$derived_key
=
$this
->
build
_k
ey
(
$key
,
$group
);
if
(
!
in_array
(
$group
,
$this
->
no_redis_groups
)
)
{
$value
=
$this
->
redis
->
get
(
$derived_key
);
...
...
@@ -957,7 +957,7 @@ class WP_Object_Cache {
* @return bool Returns TRUE on success or FALSE on failure.
*/
public
function
set
(
$key
,
$value
,
$group
=
'default'
,
$expiration
=
0
,
$server_key
=
''
)
{
$derived_key
=
$this
->
build
K
ey
(
$key
,
$group
);
$derived_key
=
$this
->
build
_k
ey
(
$key
,
$group
);
// If group is a non-Redis group, save to runtime cache, not Redis
if
(
in_array
(
$group
,
$this
->
no_redis_groups
)
)
{
...
...
@@ -985,7 +985,7 @@ class WP_Object_Cache {
*
* @return string
*/
public
function
build
K
ey
(
$key
,
$group
=
'default'
)
{
public
function
build
_k
ey
(
$key
,
$group
=
'default'
)
{
if
(
empty
(
$group
)
)
{
$group
=
'default'
;
}
...
...
@@ -1018,7 +1018,7 @@ class WP_Object_Cache {
* @return bool|mixed Value on success; false on failure.
*/
public
function
get_from_runtime_cache
(
$key
,
$group
)
{
$derived_key
=
$this
->
build
K
ey
(
$key
,
$group
);
$derived_key
=
$this
->
build
_k
ey
(
$key
,
$group
);
if
(
isset
(
$this
->
cache
[
$derived_key
]
)
)
{
return
$this
->
cache
[
$derived_key
];
...
...
Write
Preview
Markdown
is supported
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