Prefix redis keys by configuration

Is there a way to prefix everything that gets stored in redis when setting up?

I’d like to use the same azure redis instance for my ‘debug’ and ‘release’ built test websites, in theory also production environment…although that’s probably a very bad idea. Anyway if I could configure then I would not need to pay for more than two separate instances of redis.

I am using redis for both Caching and MQ and I understand it would be best to config each separately and for MQ I would need to configure both ‘producer’ and ‘handler’ ends.

No there isn’t an option to prefix everything, you’d need to use a separate Redis Instance or specify to use a separate Redis Database Index, e.g:

container.Register<IRedisClientsManager>(c => 
    new RedisManagerPool("host:port?db=1"));
1 Like