Open dd32 opened 2 years ago
We have recently discovered this too and hope that support for wp_cache_flush_group()
is added soon ...
[12-Apr-2024 06:51:20 UTC] E_USER_NOTICE: Function wp_cache_flush_group was called incorrectly. Your object cache implementation does not support flushing individual groups. Please see Debugging in WordPress for more information. (This message was added in version 6.1.0.) in /wp-includes/functions.php](/wp-includes/functions.php) on line 6078
In the meantime we are using this which isn't ideal as it flushes the entire cache ...
if (wp_cache_supports('flush_group')) {
wp_cache_flush_group('theme_json');
} else {
wp_cache_flush();
}
Oliver
Per https://core.trac.wordpress.org/ticket/4476
This would require adding an additional flush group on a per-cache-group basis.
Falling back to
wp_cache_flush()
would cause issues if a plugin on the main site attempted to flush a specific cache group, as it'd rotate every cache.