Make WordPress Core


Ignore:
Timestamp:
02/11/2022 05:42:51 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Update DocBlocks for some object cache functions per the documentation standards.

Follow-up to [47060], [47938], [47944], [52700].

See #54729, #54574.

File:
1 edited

Legend:

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

    r52700 r52703  
    142142         * @param mixed      $data   The contents to store in the cache.
    143143         * @param string     $group  Optional. Where to group the cache contents. Default 'default'.
    144          * @param int        $expire Optional. When to expire the cache contents. Default 0 (no expiration).
     144         * @param int        $expire Optional. When to expire the cache contents, in seconds.
     145         *                           Default 0 (no expiration).
    145146         * @return bool True on success, false if cache key and group already exist.
    146147         */
     
    186187         *
    187188         * @param int|string $key    The cache key to decrement.
    188          * @param int        $offset Optional. The amount by which to decrement the item's value. Default 1.
     189         * @param int        $offset Optional. The amount by which to decrement the item's value.
     190         *                           Default 1.
    189191         * @param string     $group  Optional. The group the key is in. Default 'default'.
    190192         * @return int|false The item's new value on success, false on failure.
     
    228230         * @param string     $group      Optional. Where the cache contents are grouped. Default 'default'.
    229231         * @param bool       $deprecated Optional. Unused. Default false.
    230          * @return bool False if the contents weren't deleted and true on success.
     232         * @return bool True on success, false if the contents were not deleted.
    231233         */
    232234        public function delete( $key, $group = 'default', $deprecated = false ) {
     
    325327
    326328        /**
    327          * Delete multiple values from the cache in one call.
     329         * Deletes multiple values from the cache in one call.
    328330         *
    329331         * @since 6.0.0
     
    344346
    345347        /**
    346          * Add multiple values to the cache in one call.
     348         * Adds multiple values to the cache in one call.
    347349         *
    348350         * @since 6.0.0
    349351         *
    350          * @param array  $data   Array of key and value to be added.
     352         * @param array  $data   Array of keys and values to be added.
    351353         * @param string $group  Optional. Where the cache contents are grouped. Default empty.
    352          * @param int    $expire Optional. When to expire the cache contents, in seconds. Default 0 (no expiration).
     354         * @param int    $expire Optional. When to expire the cache contents, in seconds.
     355         *                       Default 0 (no expiration).
    353356         * @return array Array of return values.
    354357         */
     
    364367
    365368        /**
    366          * Set multiple values to the cache in one call.
     369         * Sets multiple values to the cache in one call.
    367370         *
    368371         * @since 6.0.0
     
    370373         * @param array  $data   Array of key and value to be set.
    371374         * @param string $group  Optional. Where the cache contents are grouped. Default empty.
    372          * @param int    $expire Optional. When to expire the cache contents, in seconds. Default 0 (no expiration).
     375         * @param int    $expire Optional. When to expire the cache contents, in seconds.
     376         *                       Default 0 (no expiration).
    373377         * @return array Array of return values.
    374378         */
     
    388392         * @since 3.3.0
    389393         *
    390          * @param int|string $key    The cache key to increment
    391          * @param int        $offset Optional. The amount by which to increment the item's value. Default 1.
     394         * @param int|string $key    The cache key to increment.
     395         * @param int        $offset Optional. The amount by which to increment the item's value.
     396         *                           Default 1.
    392397         * @param string     $group  Optional. The group the key is in. Default 'default'.
    393398         * @return int|false The item's new value on success, false on failure.
     
    431436         * @param mixed      $data   The contents to store in the cache.
    432437         * @param string     $group  Optional. Where to group the cache contents. Default 'default'.
    433          * @param int        $expire Optional. When to expire the cache contents. Default 0 (no expiration).
    434          * @return bool False if not exists, true if contents were replaced.
     438         * @param int        $expire Optional. When to expire the cache contents, in seconds.
     439         *                           Default 0 (no expiration).
     440         * @return bool True if contents were replaced, false if original value does not exist.
    435441         */
    436442        public function replace( $key, $data, $group = 'default', $expire = 0 ) {
     
    487493         * @param mixed      $data   The contents to store in the cache.
    488494         * @param string     $group  Optional. Where to group the cache contents. Default 'default'.
    489          * @param int        $expire Not Used.
     495         * @param int        $expire Optional. Not used.
    490496         * @return true Always returns true.
    491497         */
Note: See TracChangeset for help on using the changeset viewer.