I would like to be able to specify global prefix for all Redis keys. It can be used in case of multiple app instances using one Redis instance. This is basically our strategy for testing environments.
It seems that RedisStorageOptions is the right place to put this option. Configuration could look like this:
app.UseHangfire(config =>
{
config.UseRedisStorage("localhost", 0, new RedisStorageOptions
{
Prefix = "QA1"
});
})
I've dug though code and found that most of the code using RedisStorage.Prefix straight away. There is also static RedisStorage.GetRedisKey(string key) which could be used for encapsulating prefix management. Is this a viable option? Thoughts?
I would like to be able to specify global prefix for all Redis keys. It can be used in case of multiple app instances using one Redis instance. This is basically our strategy for testing environments.
It seems that
RedisStorageOptionsis the right place to put this option. Configuration could look like this:I've dug though code and found that most of the code using
RedisStorage.Prefixstraight away. There is also staticRedisStorage.GetRedisKey(string key)which could be used for encapsulating prefix management. Is this a viable option? Thoughts?