Remove the non_existent_objects property from WP_Object_Cache. Fixes #16274.
git-svn-id: https://develop.svn.wordpress.org/trunk@18682 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6d75218f6a
commit
461af47e10
|
@ -242,15 +242,6 @@ class WP_Object_Cache {
|
|||
*/
|
||||
var $cache = array ();
|
||||
|
||||
/**
|
||||
* Cache objects that do not exist in the cache
|
||||
*
|
||||
* @var array
|
||||
* @access private
|
||||
* @since 2.0.0
|
||||
*/
|
||||
var $non_existent_objects = array ();
|
||||
|
||||
/**
|
||||
* The amount of times the cache data was already stored in the cache.
|
||||
*
|
||||
|
@ -354,9 +345,6 @@ class WP_Object_Cache {
|
|||
* to false, then nothing will happen. The $force parameter is set to false
|
||||
* by default.
|
||||
*
|
||||
* On success the group and the id will be added to the
|
||||
* $non_existent_objects property in the class.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param int|string $key What the contents in the cache are called
|
||||
|
@ -373,7 +361,6 @@ class WP_Object_Cache {
|
|||
return false;
|
||||
|
||||
unset ($this->cache[$group][$key]);
|
||||
$this->non_existent_objects[$group][$key] = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -397,11 +384,7 @@ class WP_Object_Cache {
|
|||
* key in the cache group. If the cache is hit (success) then the contents
|
||||
* are returned.
|
||||
*
|
||||
* On failure, the $non_existent_objects property is checked and if the
|
||||
* cache group and key exist in there the cache misses will not be
|
||||
* incremented. If not in the nonexistent objects property, then the cache
|
||||
* misses will be incremented and the cache group and key will be added to
|
||||
* the nonexistent objects.
|
||||
* On failure, the number of cache misses will be incremented.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
|
@ -423,10 +406,6 @@ class WP_Object_Cache {
|
|||
return $this->cache[$group][$key];
|
||||
}
|
||||
|
||||
if ( isset ($this->non_existent_objects[$group][$key]) )
|
||||
return false;
|
||||
|
||||
$this->non_existent_objects[$group][$key] = true;
|
||||
$this->cache_misses += 1;
|
||||
return false;
|
||||
}
|
||||
|
@ -524,10 +503,6 @@ class WP_Object_Cache {
|
|||
$data = clone $data;
|
||||
|
||||
$this->cache[$group][$key] = $data;
|
||||
|
||||
if ( isset($this->non_existent_objects[$group][$key]) )
|
||||
unset ($this->non_existent_objects[$group][$key]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue