Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable prefix for Redis keys #195

rooks opened this issue Sep 2, 2014 · 2 comments

Configurable prefix for Redis keys #195

rooks opened this issue Sep 2, 2014 · 2 comments


Copy link

rooks commented Sep 2, 2014

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?

Copy link

sergeyzwezdin commented Nov 7, 2014

Looks very useful. Vote for this feature as well :-)

Copy link

odinserj commented Nov 15, 2014

This feature is implemented in a new Hangfire.Pro.Redis library that is shipped with Hangfire Pro. You can read more details here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

No branches or pull requests

3 participants