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

Closed
rooks opened this issue Sep 2, 2014 · 2 comments
Closed

Configurable prefix for Redis keys #195

rooks opened this issue Sep 2, 2014 · 2 comments
Labels

Comments

@rooks
Copy link

@rooks 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?

@sergeyzwezdin
Copy link
Contributor

@sergeyzwezdin sergeyzwezdin commented Nov 7, 2014

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

@odinserj
Copy link
Member

@odinserj 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.

@odinserj odinserj closed this Nov 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.