Changeset 53763 for trunk/src/wp-includes/cache-compat.php
- Timestamp:
- 07/22/2022 08:50:31 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/cache-compat.php
r53206 r53763 142 142 } 143 143 endif; 144 145 if ( ! function_exists( 'wp_cache_flush_group' ) ) : 146 /** 147 * 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. 150 * 151 * @since 6.1.0 152 * 153 * @see WP_Object_Cache::flush_group() 154 * @global WP_Object_Cache $wp_object_cache Object cache global instance. 155 * 156 * @param string $group Name of group to remove from cache. 157 * @return bool True if group was flushed, false otherwise. 158 */ 159 function wp_cache_flush_group( $group ) { 160 global $wp_object_cache; 161 162 if ( ! wp_cache_supports_group_flush() ) { 163 _doing_it_wrong( 164 __FUNCTION__, 165 __( 'Your object cache implementation does not support flushing individual groups.' ), 166 '6.1.0' 167 ); 168 169 return false; 170 } 171 172 return $wp_object_cache->flush_group( $group ); 173 } 174 endif; 175 176 if ( ! function_exists( 'wp_cache_supports_group_flush' ) ) : 177 /** 178 * Whether the object cache implementation supports flushing individual cache groups. 179 * 180 * @since 6.1.0 181 * 182 * @see WP_Object_Cache::flush_group() 183 * 184 * @return bool True if group flushing is supported, false otherwise. 185 */ 186 function wp_cache_supports_group_flush() { 187 return false; 188 } 189 endif;
Note: See TracChangeset
for help on using the changeset viewer.