rhubarbgroup / redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
https://wordpress.org/plugins/redis-cache/
GNU General Public License v3.0
425 stars 148 forks source link

Support disabling of group flush #528

Closed tillkruss closed 2 months ago

tillkruss commented 3 months ago

The number of people having issues with the "group flushing" is increasing.

"897365:M 14 May 2024 05:03:12.804 # Slow script detected: still in execution after 5057 milliseconds. You can try killing the script using the SCRIPT KILL command. Script name is: 83d2735811c249cfed69f9f269a2ee1f85943645.
897365:M 14 May 2024 05:18:12.381 # Slow script detected: still in execution after 5069 milliseconds. You can try killing the script using the SCRIPT KILL command. Script name is: 83d2735811c249cfed69f9f269a2ee1f85943645.
897365:M 14 May 2024 05:33:12.863 # Slow script detected: still in execution after 5076 milliseconds. You can try killing the script using the SCRIPT KILL command. Script name is: 83d2735811c249cfed69f9f269a2ee1f85943645."

https://wordpress.org/support/topic/error-with-yoast-seo-22-1/#post-17761939

tillkruss commented 3 months ago

What we need to do here is add a constant WP_REDIS_DISABLE_GROUP_FLUSH and document it in the README.

When it's set, all calls to flush_group() should use flush() instead to wipe the entire cache.