Instead of symlinking, you can copy the source file to wp-content/object-cache.php
and then make your changes— any future plugin updates would not overwrite the object-cache.php
file outside of the plugin directory.
I don’t expect object-cache.php
to change too often (it most recently did to fix PHP 8.2 compatibility), but you will want to keep an eye on future releases changing object-cache.php
which would no longer be applied.
If you have a sense of how you might achieve your changes to object-cache.php using hooks/actions, you might also fork the plugin and open a PR to https://github.com/pantheon-systems/wp-redis/