Need to confirm that my WordPress setup is using Redis correctly. #70
-
|
Hi, I need to confirm that my WordPress setup is using Redis correctly. I run two separate WordPress sites on the same server. I tried to set each site to use a different Redis database by using WP_REDIS_DB, for example DB 0 and DB 2. The Redis Object Cache plugin did not allow this. The plugin would always connect to DB 0, even when WP_REDIS_DB was defined correctly in wp-config.php. The Redis diagnostics panel in WordPress always showed database 0. USA site prefix: usa_ Both prefixes now appear correctly in the Redis Object Cache diagnostics inside WordPress. Hoping someone can confirm the following points: Using unique prefixes is the correct way to isolate cache keys when the plugin does not allow separate numbered databases. The usa_ and uk_ prefixes guarantee that the two WordPress sites do not overwrite each other’s Redis keys. There is no risk of cache conflicts between the two sites when prefixes are used in this way. This approach is suitable for a non shared hosting server. I want to be certain that both sites are now fully isolated inside Redis even though they share the same Redis database number. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I'd suggest checking out the README, it lists the correct constant name to isolate sites by Redis database index, which is the best way to go ✌️ |
Beta Was this translation helpful? Give feedback.
I'd suggest checking out the README, it lists the correct constant name to isolate sites by Redis database index, which is the best way to go ✌️