Make WordPress Core


Ignore:
Timestamp:
07/23/2022 02:56:51 PM (22 months 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/tests/phpunit/includes/object-cache.php

    r53763 r53767  
    283283    global $wp_object_cache;
    284284    return $wp_object_cache->flush( $delay );
     285}
     286
     287/**
     288 * Whether the object cache implementation supports flushing individual cache groups.
     289 *
     290 * @since 6.1.0
     291 *
     292 * @return bool True if group flushing is supported, false otherwise.
     293 */
     294function wp_cache_supports_group_flush() {
     295    return false;
    285296}
    286297
     
    744755    global $wp_object_cache;
    745756    $wp_object_cache = new WP_Object_Cache();
    746 }
    747 
    748 /**
    749  * Whether the object cache implementation supports flushing individual cache groups.
    750  *
    751  * @since 6.1.0
    752  *
    753  * @return bool True if group flushing is supported, false otherwise.
    754  */
    755 function wp_cache_supports_group_flush() {
    756     return false;
    757757}
    758758
Note: See TracChangeset for help on using the changeset viewer.