Automattic / wp-memcached

Memcached Object Cache for WordPress.
https://wordpress.org/plugins/memcached/
GNU General Public License v2.0
159 stars 55 forks source link

Implement wp_cache_flush_group() #80

Open dd32 opened 2 years ago

dd32 commented 2 years ago

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.

webd-uk commented 6 months 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