pantheon-systems / wp-redis

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

how to prevent collision | one host, many websites #278

Closed wkhayrattee closed 4 years ago

wkhayrattee commented 4 years ago

Hello, I have two wordpress on a vps. Despite setting the redis database to be different in each. I observe via redis-cli monitor there is collision. For some reason, the database is always saving at 0 even though I have set it to be 5' and20` respectively for each website.

Any thoughts here?

danielbachhuber commented 4 years ago

Hi @7php:

I observe via redis-cli monitor there is collision. For some reason, the database is always saving at 0 even though I have set it to be 5' and 20` respectively for each website.

It's hard to say why this might be happening. However, there is an existing alternative to using different Redis databases. If you define the WP_CACHE_KEY_SALT constant to different values for each WordPress install, multiple WordPress sites can share the same Redis database.