You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be in order to support multiple servers connecting to the same Redis instance. Using just the WP_CACHE_KEY_SALT is not enough when you end up calling the wp_flush_cache() method as it will remove everything in the DB instance not just those items with the specified WP_CACHE_KEY_SALT.
The text was updated successfully, but these errors were encountered:
$redis_server = array(
'host' => '127.0.0.1',
'port' => 6379,
'auth' => '12345',
'database' => 0, // Optionally use a specific numeric Redis database. Default is 0.
);
when not on Pantheon but it's just as easy to use/setup the Pantheon environment variables when using a VPS. In the code you aren't allowing for the selection of a database, with a fallback default, to make this usable without that custom code. I can't use that custom code when using a Composer-based managed WordPress instance.
So as I was going back to check any other cases where the $redis_server array was being used I discovered that there is a filter that could be used in this case wp_redis_prepare_client_connection_callback
This would be in order to support multiple servers connecting to the same Redis instance. Using just the
WP_CACHE_KEY_SALT
is not enough when you end up calling thewp_flush_cache()
method as it will remove everything in the DB instance not just those items with the specifiedWP_CACHE_KEY_SALT
.The text was updated successfully, but these errors were encountered: