Make WordPress Core


Ignore:
Timestamp:
02/11/2022 07:19:57 PM (3 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/cache-compat.php

    r52706 r52708  
    2424     * @param int    $expire Optional. When to expire the cache contents, in seconds.
    2525     *                       Default 0 (no expiration).
    26      * @return array Array of return values.
     26     * @return bool[] Array of return values, grouped by key. Each value is either
     27     *                true on success, or false if cache key and group already exist.
    2728     */
    2829    function wp_cache_add_multiple( array $data, $group = '', $expire = 0 ) {
     
    5455     * @param int    $expire Optional. When to expire the cache contents, in seconds.
    5556     *                       Default 0 (no expiration).
    56      * @return array Array of return values.
     57     * @return bool[] Array of return values, grouped by key. Each value is either
     58     *                true on success, or false on failure.
    5759     */
    5860    function wp_cache_set_multiple( array $data, $group = '', $expire = 0 ) {
     
    8284     * @param bool   $force Optional. Whether to force an update of the local cache
    8385     *                      from the persistent cache. Default false.
    84      * @return array Array of values organized into groups.
     86     * @return array Array of return values, grouped by key. Each value is either
     87     *               the cache contents on success, or false on failure.
    8588     */
    8689    function wp_cache_get_multiple( $keys, $group = '', $force = false ) {
     
    108111     * @param array  $keys  Array of keys under which the cache to deleted.
    109112     * @param string $group Optional. Where the cache contents are grouped. Default empty.
    110      * @return array Array of return values.
     113     * @return bool[] Array of return values, grouped by key. Each value is either
     114     *                true on success, or false if the contents were not deleted.
    111115     */
    112116    function wp_cache_delete_multiple( array $keys, $group = '' ) {
Note: See TracChangeset for help on using the changeset viewer.