Make WordPress Core


Ignore:
Timestamp:
07/23/2022 02:56:51 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Cache API: Make the placement of wp_cache_flush_group() more consistent.

Includes:

  • Placing WP_Object_Cache::flush_group() next to ::flush().
  • Placing wp_cache_supports_group_flush() next to wp_cache_flush_group().
  • Placing the wp_cache_flush_group() unit test next to the ::flush() method test.
  • Removing test name from assertion messages, as it is already mentioned directly above in case of failure.
  • Adjusting function descriptions per the documentation standards.

Follow-up to [52706], [53763].

See #55647, #4476.

File:
1 edited

Legend:

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

    r53763 r53767  
    146146    /**
    147147     * Removes all cache items in a group, if the object cache implementation supports it.
    148      * Before calling this method, always check for group flushing support using the
    149      * `wp_cache_supports_group_flush()` method.
     148     *
     149     * Before calling this function, always check for group flushing support using the
     150     * `wp_cache_supports_group_flush()` function.
    150151     *
    151152     * @since 6.1.0
     
    176177if ( ! function_exists( 'wp_cache_supports_group_flush' ) ) :
    177178    /**
    178      * Whether the object cache implementation supports flushing individual cache groups.
     179     * Determines whether the object cache implementation supports flushing individual cache groups.
    179180     *
    180181     * @since 6.1.0
Note: See TracChangeset for help on using the changeset viewer.