Using Redis for asp.net core distributed cache

We are trying to follow the instructions in the web farm guide https://www.componentspace.com/documentation/saml-for-asp-net-core/ComponentSpace%20SAML%20for%20ASP.NET%20Core%20Web%20Farm%20Guide.pdf for the asp.net core version to move from a sql cache for saml to using redis instead. We already are using redis for other things in our app.
The instructions say to use

// Add the Redis cache.
services.AddDistributedRedisCache (option =>
{
option.Configuration = Configuration.GetConnectionString (“RedisConnection”);
});

But AddDistributedRedisCache is nowhere in ComponentSpace as far as I can see. Has the documentation not been updated? What is the correct way to use redis for a distributed cache on the latest version of componentspace saml for asp.net core?

AddDistributedRedisCache is a Microsoft extension method. This applies to .NET Core 2.2 and earlier. For .NET Core 3.x you should use AddStackExchangeRedisCache.

I’ll see that our documentation is updated to make this clearer.

More information about using AddDistributedRedisCache may be found at:

https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.rediscacheservicecollectionextensions.adddistributedrediscache?view=dotnet-plat-ext-2.2

https://docs.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-2.1

More information about using AddStackExchangeRedisCache may be found at:

https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.stackexchangerediscacheservicecollectionextensions.addstackexchangerediscache?view=dotnet-plat-ext-3.1

https://docs.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-3.1