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:
duck_ 2011-09-15 20:28:06 +00:00
parent cda68f14f9
commit e085f4f0d6
1 changed files with 1 additions and 26 deletions

View File

@ -242,15 +242,6 @@ class WP_Object_Cache {
*/ */
var $cache = array (); 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. * 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 * to false, then nothing will happen. The $force parameter is set to false
* by default. * 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 * @since 2.0.0
* *
* @param int|string $key What the contents in the cache are called * @param int|string $key What the contents in the cache are called
@ -373,7 +361,6 @@ class WP_Object_Cache {
return false; return false;
unset ($this->cache[$group][$key]); unset ($this->cache[$group][$key]);
$this->non_existent_objects[$group][$key] = true;
return 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 * key in the cache group. If the cache is hit (success) then the contents
* are returned. * are returned.
* *
* On failure, the $non_existent_objects property is checked and if the * On failure, the number of cache misses will be incremented.
* 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.
* *
* @since 2.0.0 * @since 2.0.0
* *
@ -423,10 +406,6 @@ class WP_Object_Cache {
return $this->cache[$group][$key]; 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; $this->cache_misses += 1;
return false; return false;
} }
@ -524,10 +503,6 @@ class WP_Object_Cache {
$data = clone $data; $data = clone $data;
$this->cache[$group][$key] = $data; $this->cache[$group][$key] = $data;
if ( isset($this->non_existent_objects[$group][$key]) )
unset ($this->non_existent_objects[$group][$key]);
return true; return true;
} }