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

Comments

3 participants
@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

This comment has been minimized.

Show comment
Hide comment
@sergeyzwezdin

sergeyzwezdin Nov 7, 2014

Contributor

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

Contributor

sergeyzwezdin commented Nov 7, 2014

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

@odinserj

This comment has been minimized.

Show comment
Hide comment
@odinserj

odinserj Nov 15, 2014

Member

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

Member

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