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
439 stars 150 forks source link

Issue with WP_REDIS_GRACEFUL #386

Closed ffxluca closed 1 year ago

ffxluca commented 2 years ago

I have one issue with WP_REDIS_GRACEFUL

WordPress makes several calls to wp_cache_delete() (especially wp-includes/meta.php ): if one of them ends up being a no-op, the relevant cache entry becomes stale. WordPress eventually will re-connect to Redis, and that will respond with a cache hit instead of a cache miss.

Note it is borderline impossible to replicate this behaviour unless the Redis server is hosted on a different machine rather than the one where WordPress runs (with php-fpm, in my case).

tillkruss commented 2 years ago

Any suggestions on how to improve this?

I actually lean towards removing it entirely because it prompts the cache being out of sync.