mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Remove the non_existent_objects property from WP_Object_Cache. Fixes #16274.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cda68f14f9
commit
e085f4f0d6
@ -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
Block a user