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

Incorporate state name into key for Redis grain storage #8487

Merged
merged 3 commits into from Jun 15, 2023

Conversation

ReubenBond
Copy link
Member

@ReubenBond ReubenBond commented Jun 14, 2023

Fixes #8485

This PR incorporates the state name into the key format for the Redis grain storage provider.
To continue using the key format from the beta versions of storage provider, you will need to configure the delegate used to resolve a key via the RedisStorageOptions.GetKey property. A helper method is provided to do so as an extension method on OptionsBuilder<RedisStorageOptions>. Here is an example:

siloBuilder
    .AddRedisGrainStorage("MyGrainStorage", (OptionsBuilder<RedisStorageOptions> optionsBuilder) =>
    {
        optionsBuilder.UseGetRedisKeyIgnoringGrainType();
        optionsBuilder.Configure(options =>
        {
            options.ConfigurationOptions = ConfigurationOptions.Parse(connectionString);
        });
    })
Microsoft Reviewers: Open in CodeFlow

@benjaminpetit benjaminpetit merged commit 5d7df9a into dotnet:main Jun 15, 2023
18 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In the implementation of Redis persistence, the GetKey method does not use the grainType parameter
2 participants