Two different versions of the application (debug and release) share same instance of Redis. Both Debug and Release have identical source code and therefore identical caching keys for being stored in Redis.
Thus when Debug does redis.StringSet(key1, value1)
Release could easily overwrite key1
or read incorrect value (since it should have its own key1
).
Is there a way to avoid such interference?
Do not do that - sharing is bad. Spin a Redis instance per environment, each server has negligible overhead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With