pantheon-systems / wp-redis

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

PHP Fatal error: Cannot redeclare wp_cache_add() #341

Closed sjoukedv closed 2 years ago

sjoukedv commented 2 years ago

Hi,

The drop-in is throwing a fatal error;

PHP Fatal error: Cannot redeclare wp_cache_add()
(previously declared in /<path>/public/wp-content/object-cache.php:33) in /<path>/public/wp-includes/cache.php on line 30" 

The wp_cache_add() function is not mentioned in the pluggable functions. Nevertheless, several Redis plugins override this function (and it's siblings) inside a drop-in.

All help is appreciated!

danielbachhuber commented 2 years ago

Replied in the WordPress.org forums: https://wordpress.org/support/topic/wp_cache_add-cannot-be-redefined/