Make WordPress Core


Ignore:
Timestamp:
02/11/2022 07:19:57 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve @return tags for wp_cache_*_multiple() functions:

  • wp_cache_add_multiple()
  • wp_cache_set_multiple()
  • wp_cache_get_multiple()
  • wp_cache_delete_multiple()

This aims to provide more details about the returned value types.

Follow-up to [52700], [52702], [52703].

See #54729, #54574.

File:
1 edited

Legend:

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

    r52706 r52708  
    189189         * @param int    $expire Optional. When to expire the cache contents, in seconds.
    190190         *                       Default 0 (no expiration).
    191          * @return array Array of return values.
     191         * @return bool[] Array of return values, grouped by key. Each value is either
     192         *                true on success, or false if cache key and group already exist.
    192193         */
    193194        public function add_multiple( array $data, $group = '', $expire = 0 ) {
    … …  
    278279         * @param int    $expire Optional. When to expire the cache contents, in seconds.
    279280         *                       Default 0 (no expiration).
    280          * @return array Array of return values.
     281         * @return bool[] Array of return values, grouped by key. Each value is always true.
    281282         */
    282283        public function set_multiple( array $data, $group = '', $expire = 0 ) {
    … …  
    342343         * @param bool   $force Optional. Whether to force an update of the local cache
    343344         *                      from the persistent cache. Default false.
    344          * @return array Array of values organized into groups.
     345         * @return array Array of return values, grouped by key. Each value is either
     346         *               the cache contents on success, or false on failure.
    345347         */
    346348        public function get_multiple( $keys, $group = 'default', $force = false ) {
    … …  
    390392         * @param array  $keys  Array of keys to be deleted.
    391393         * @param string $group Optional. Where the cache contents are grouped. Default empty.
    392          * @return array Array of return values.
     394         * @return bool[] Array of return values, grouped by key. Each value is either
     395         *                true on success, or false if the contents were not deleted.
    393396         */
    394397        public function delete_multiple( array $keys, $group = '' ) {
Note: See TracChangeset for help on using the changeset viewer.