Skip to content

React to StackExchange.Redis v2.0 #322

@BrennanConroy

Description

@BrennanConroy

We are introducing two new packages to use StackExchange.Redis 2.0 with ASP.NET Core Caching and SignalR. We are also introducing support for using Redis to store DataProtection key material using StackExchange.Redis 2.0.

For ASP.NET Core 2.2 we will continue to ship our existing packages which use StackExchange.Redis 1.0, to preserve compatibility for existing users. However, we suggest you update to the new package as soon as possible. These packages are now considered deprecated and will be removed in ASP.NET Core 3.0.

Caching

We are releasing a new package "Microsoft.Extensions.Caching.StackExchangeRedis" which will depend on StackExchange.Redis 2.0. "Microsoft.Extensions.Caching.Redis" will continue to ship in ASP.NET Core 2.2 with the StackExchange.Redis 1.0 dependency and will be removed in 3.0.

To use the new package, remove your dependency on Microsoft.Extensions.Caching.Redis (if present), and add a dependency to "Microsoft.Extensions.Caching.StackExchangeRedis". Next, change your AddDistributedRedisCache invocation in ConfigureServices to AddStackExchangeRedisCache. No further changes should be necessary.

DataProtection

The "Microsoft.AspNetCore.DataProtection.Redis" package is new in ASP.NET Core 2.2 and depends on StackExchange.Redis 1.0 in Preview 2. In Preview 3, this package has been renamed to "Microsoft.AspNetCore.DataProtection.StackExchangeRedis" and has been updated to use StackExchange.Redis 2.0.

To use the new package, remove your dependency on Microsoft.AspNetCore.DataProtection.Redis (if present), and add a dependency to "Microsoft.AspNetCore.DataProtection.StackExchangeRedis". Next, change your PersistKeysToRedis invocation in ConfigureServices to PersistKeysToStackExchangeRedis. No further changes should be necessary.

SignalR

We are releasing a new package "Microsoft.AspNetCore.SignalR.StackExchangeRedis" which will depend on StackExchange.Redis 2.0. "Microsoft.AspNetCore.SignalR.Redis" will continue to ship in ASP.NET Core 2.2 with the StackExchange.Redis 1.0 dependency and will be removed in 3.0.

To use the new package, remove your dependency on Microsoft.AspNetCore.SignalR.Redis (if present), and add a dependency to "Microsoft.AspNetCore.SignalR.StackExchangeRedis". Next, change your AddRedis invocation in ConfigureServices to AddStackExchangeRedis. No further changes should be necessary.


For questions or further discussions about the changes, please use dotnet/aspnetcore#3606.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions