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

Consistency in function naming and internal references

parent 83cd8e87
No related branches found
No related tags found
No related merge requests found
...@@ -314,7 +314,7 @@ class WP_Object_Cache { ...@@ -314,7 +314,7 @@ class WP_Object_Cache {
public function add( $key, $value, $group = 'default', $expiration = 0 ) { public function add( $key, $value, $group = 'default', $expiration = 0 ) {
$derived_key = $this->build_key( $key, $group ); $derived_key = $this->build_key( $key, $group );
// If group is a non-Redis group, save to runtime cache, not Redis // If group is a non-Redis group, save to internal cache, not Redis
if ( in_array( $group, $this->no_redis_groups ) ) { if ( in_array( $group, $this->no_redis_groups ) ) {
// Add does not set the value if the key exists; mimic that here // Add does not set the value if the key exists; mimic that here
...@@ -438,7 +438,7 @@ class WP_Object_Cache { ...@@ -438,7 +438,7 @@ class WP_Object_Cache {
public function set( $key, $value, $group = 'default', $expiration = 0 ) { public function set( $key, $value, $group = 'default', $expiration = 0 ) {
$derived_key = $this->build_key( $key, $group ); $derived_key = $this->build_key( $key, $group );
// If group is a non-Redis group, save to runtime cache, not Redis // If group is a non-Redis group, save to internal cache, not Redis
if ( in_array( $group, $this->no_redis_groups ) ) { if ( in_array( $group, $this->no_redis_groups ) ) {
$this->add_to_internal_cache( $derived_key, $value ); $this->add_to_internal_cache( $derived_key, $value );
...@@ -468,9 +468,9 @@ class WP_Object_Cache { ...@@ -468,9 +468,9 @@ class WP_Object_Cache {
$derived_key = $this->build_key( $key, $group ); $derived_key = $this->build_key( $key, $group );
$offset = (int) $offset; $offset = (int) $offset;
// If group is a non-Redis group, save to runtime cache, not Redis // If group is a non-Redis group, save to internal cache, not Redis
if ( in_array( $group, $this->no_redis_groups ) ) { if ( in_array( $group, $this->no_redis_groups ) ) {
$value = $this->get_from_runtime_cache( $derived_key ); $value = $this->get_from_internal_cache( $derived_key );
$value += $offset; $value += $offset;
$this->add_to_internal_cache( $derived_key, $value ); $this->add_to_internal_cache( $derived_key, $value );
...@@ -497,9 +497,9 @@ class WP_Object_Cache { ...@@ -497,9 +497,9 @@ class WP_Object_Cache {
$derived_key = $this->build_key( $key, $group ); $derived_key = $this->build_key( $key, $group );
$offset = (int) $offset; $offset = (int) $offset;
// If group is a non-Redis group, save to runtime cache, not Redis // If group is a non-Redis group, save to internal cache, not Redis
if ( in_array( $group, $this->no_redis_groups ) ) { if ( in_array( $group, $this->no_redis_groups ) ) {
$value = $this->get_from_runtime_cache( $derived_key ); $value = $this->get_from_internal_cache( $derived_key );
$value -= $offset; $value -= $offset;
$this->add_to_internal_cache( $derived_key, $value ); $this->add_to_internal_cache( $derived_key, $value );
...@@ -590,7 +590,7 @@ class WP_Object_Cache { ...@@ -590,7 +590,7 @@ class WP_Object_Cache {
* @param mixed $value Object value. * @param mixed $value Object value.
*/ */
public function add_to_internal_cache( $derived_key, $value ) { public function add_to_internal_cache( $derived_key, $value ) {
$this->cache[ $derived_key ] = $value; $this->cache[$derived_key] = $value;
} }
/** /**
...@@ -601,7 +601,7 @@ class WP_Object_Cache { ...@@ -601,7 +601,7 @@ class WP_Object_Cache {
* *
* @return bool|mixed Value on success; false on failure. * @return bool|mixed Value on success; false on failure.
*/ */
public function get_from_runtime_cache( $key, $group ) { public function get_from_internal_cache( $key, $group ) {
$derived_key = $this->build_key( $key, $group ); $derived_key = $this->build_key( $key, $group );
if ( isset( $this->cache[ $derived_key ] ) ) { if ( isset( $this->cache[ $derived_key ] ) ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment