WordPress.org

Make WordPress Core

Changeset 18653


Ignore:
Timestamp:
09/08/2011 05:19:09 PM (8 years ago)
Author:
ryan
Message:

Update cache.php phpdoc. Props SergeyBiryukov. fixes #18607

File:
1 edited

Legend:

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

    r18644 r18653  
    1616 * @see WP_Object_Cache::add()
    1717 *
    18  * @param int|string $key The cache ID to use for retrieval later
     18 * @param int|string $key The cache key to use for retrieval later
    1919 * @param mixed $data The data to add to the cache store
    2020 * @param string $group The group to add the cache to
     
    5151 * @see WP_Object_Cache::decr()
    5252 *
    53  * @param int|string $key The cache ID to increment
     53 * @param int|string $key The cache key to increment
    5454 * @param int $offset The amount by which to decrement the item's value.  Default is 1.
    5555 * @param string $group The group the key is in.
     
    6363
    6464/**
    65  * Removes the cache contents matching ID and flag.
     65 * Removes the cache contents matching key and group.
    6666 *
    6767 * @since 2.0.0
     
    9595
    9696/**
    97  * Retrieves the cache contents from the cache by ID and flag.
     97 * Retrieves the cache contents from the cache by key and group.
    9898 *
    9999 * @since 2.0.0
     
    119119 * @see WP_Object_Cache::incr()
    120120 *
    121  * @param int|string $key The cache ID to increment
     121 * @param int|string $key The cache key to increment
    122122 * @param int $offset The amount by which to increment the item's value.  Default is 1.
    123123 * @param string $group The group the key is in.
     
    151151 * @param string $group Where to group the cache contents
    152152 * @param int $expire When to expire the cache contents
    153  * @return bool False if cache ID and group already exists, true on success
     153 * @return bool False if cache key and group already exist, true on success
    154154 */
    155155function wp_cache_replace($key, $data, $group = '', $expire = 0) {
     
    170170 * @param string $group Where to group the cache contents
    171171 * @param int $expire When to expire the cache contents
    172  * @return bool False if cache ID and group already exists, true on success
     172 * @return bool False if cache key and group already exist, true on success
    173173 */
    174174function wp_cache_set($key, $data, $group = '', $expire = 0) {
     
    291291     * @param string $group Where to group the cache contents
    292292     * @param int $expire When to expire the cache contents
    293      * @return bool False if cache ID and group already exists, true on success
     293     * @return bool False if cache key and group already exist, true on success
    294294     */
    295295    function add( $key, $data, $group = 'default', $expire = '' ) {
     
    322322     * @since 3.3.0
    323323     *
    324      * @param int|string $key The cache ID to increment
     324     * @param int|string $key The cache key to increment
    325325     * @param int $offset The amount by which to decrement the item's value.  Default is 1.
    326326     * @param string $group The group the key is in.
     
    345345
    346346    /**
    347      * Remove the contents of the cache ID in the group
    348      *
    349      * If the cache ID does not exist in the group and $force parameter is set
     347     * Remove the contents of the cache key in the group
     348     *
     349     * If the cache key does not exist in the group and $force parameter is set
    350350     * to false, then nothing will happen. The $force parameter is set to false
    351351     * by default.
     
    359359     * @param string $group Where the cache contents are grouped
    360360     * @param bool $force Optional. Whether to force the unsetting of the cache
    361      *      ID in the group
     361     *      key in the group
    362362     * @return bool False if the contents weren't deleted and true on success
    363363     */
     
    391391     *
    392392     * The contents will be first attempted to be retrieved by searching by the
    393      * ID in the cache group. If the cache is hit (success) then the contents
     393     * key in the cache group. If the cache is hit (success) then the contents
    394394     * are returned.
    395395     *
    396396     * On failure, the $non_existent_objects property is checked and if the
    397      * cache group and ID exist in there the cache misses will not be
     397     * cache group and key exist in there the cache misses will not be
    398398     * incremented. If not in the nonexistent objects property, then the cache
    399      * misses will be incremented and the cache group and ID will be added to
     399     * misses will be incremented and the cache group and key will be added to
    400400     * the nonexistent objects.
    401401     *
     
    432432     * @since 3.3.0
    433433     *
    434      * @param int|string $key The cache ID to increment
     434     * @param int|string $key The cache key to increment
    435435     * @param int $offset The amount by which to increment the item's value.  Default is 1.
    436436     * @param string $group The group the key is in.
Note: See TracChangeset for help on using the changeset viewer.