Make WordPress Core


Ignore:
Timestamp:
09/15/2011 08:28:06 PM (13 years ago)
Author:
duck_
Message:

Remove the non_existent_objects property from WP_Object_Cache. Fixes #16274.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/cache.php

    r18681 r18682  
    244244
    245245    /**
    246      * Cache objects that do not exist in the cache
    247      *
    248      * @var array
    249      * @access private
    250      * @since 2.0.0
    251      */
    252     var $non_existent_objects = array ();
    253 
    254     /**
    255246     * The amount of times the cache data was already stored in the cache.
    256247     *
     
    355346     * by default.
    356347     *
    357      * On success the group and the id will be added to the
    358      * $non_existent_objects property in the class.
    359      *
    360348     * @since 2.0.0
    361349     *
     
    374362
    375363        unset ($this->cache[$group][$key]);
    376         $this->non_existent_objects[$group][$key] = true;
    377364        return true;
    378365    }
     
    398385     * are returned.
    399386     *
    400      * On failure, the $non_existent_objects property is checked and if the
    401      * cache group and key exist in there the cache misses will not be
    402      * incremented. If not in the nonexistent objects property, then the cache
    403      * misses will be incremented and the cache group and key will be added to
    404      * the nonexistent objects.
     387     * On failure, the number of cache misses will be incremented.
    405388     *
    406389     * @since 2.0.0
     
    424407        }
    425408
    426         if ( isset ($this->non_existent_objects[$group][$key]) )
    427             return false;
    428 
    429         $this->non_existent_objects[$group][$key] = true;
    430409        $this->cache_misses += 1;
    431410        return false;
     
    525504
    526505        $this->cache[$group][$key] = $data;
    527 
    528         if ( isset($this->non_existent_objects[$group][$key]) )
    529             unset ($this->non_existent_objects[$group][$key]);
    530 
    531506        return true;
    532507    }
Note: See TracChangeset for help on using the changeset viewer.