pantheon-systems / wp-redis

WordPress Object Cache using Redis.
https://wordpress.org/plugins/wp-redis/
GNU General Public License v2.0
225 stars 67 forks source link

As of WordPress 6.1 A Notice About Incorrect Support for `wp_cache_flush_runtime` #399

Closed timnolte closed 1 year ago

timnolte commented 1 year ago

I just got a site upgraded to WordPress 6.x due to a Redis caching issue, my fixed ended up being to stop using Cache Groups. That issue aside I'm now seeing in the logs:

PHP Notice:  Function wp_cache_flush_runtime was called <strong>incorrectly</strong>. Your object cache implementation does not support flushing the in-memory runtime cache. Please see <a href="https://wordpress.org/documentation/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.1.0.) in wp-includes/functions.php on line 5865
timnolte commented 1 year ago

This issue is presenting itself as pretty critical causing Gateway Timeouts on our Dev server instance. So now I'm concerned about rolling out the WordPress 6.x upgrade.

namespacebrian commented 1 year ago

Tracking internally as BUGS-6127

jspellman814 commented 1 year ago

Thank you for this report @timnolte! I believe I know what the resolution is but just to confirm, could you share some steps on how to reproduce this notice? Thanks again.

timnolte commented 1 year ago

I'm pretty sure it was when I was re-indexing Yoast SEO/SearchWP/FacetWP data.

timnolte commented 1 year ago

OK, so I'm not reproducing it via the WP-CLI locally on a site but I was for sure seeing it on the web server however it I may have been running the reindexing via the WordPress Dashboard.

timnolte commented 1 year ago

OK, so yes, I just confirmed that on our hosting environment with an AWS Redis instance that running a wp yoast index --reindex I am seeing the errors in the debug log.

timnolte commented 1 year ago

The cache configuration I'm using is similar to:

WP_CACHE=true
CACHE_PASSWORD=
CACHE_HOST=<hostname>
CACHE_PORT=6379
CACHE_DB=1
WP_CACHE_KEY_SALT=<random-characters>
jspellman814 commented 1 year ago

A fix for this has been included in the 1.4.0 release. Please test that out and reopen this if you are still experiencing the issue. Thanks!