Skip to main content
.NETFramework4.6.2net10.0.NETStandard2.0

Distributed cache implementation of Microsoft.Extensions.Caching.Distributed.IDistributedCache using Redis. This package was built from the source code at https://github.com/dotnet/dotnet/tree/89c8f6a112d37d2ea8b77821e56d170a1bccdc5a

Published
Oct 14, 2025
1y ago
Total Downloads
302.1M
302,067,683

Install

dotnet add package Microsoft.Extensions.Caching.StackExchangeRedis --version 10.0.0-rc.2.25502.107
ProductVersions
.NET
net10.0
.NET Standard
netstandard2.0
Other
.NETFramework4.6.2

README

About

Microsoft.Extensions.Caching.StackExchangeRedis provides a distributed cache implementation of Microsoft.Extensions.Caching.Distributed.IDistributedCache using Redis.

How to Use

To use Microsoft.Extensions.Caching.StackExchangeRedis, follow these steps:

Installation

dotnet add package Microsoft.Extensions.Caching.StackExchangeRedis

Configuration

To configure the Redis cache in your app, use the AddStackExchangeRedisCache extension method. Here's an example:

var builder = WebApplication.CreateBuilder();

builder.Services.AddStackExchangeRedisCache(options =>
{
    options.Configuration = builder.Configuration.GetConnectionString("MyRedisConStr");
    options.InstanceName = "MyCache";
});

Main Types

  • RedisCache: Provides a distributed cache implementation using Redis
  • RedisCacheOptions: Provides options used for configuring a RedisCache

Additional Documentation

For additional documentation and examples, refer to the official documentation on using the Distributed Redis Cache in ASP.NET Core.

Feedback & Contributing

Microsoft.Extensions.Caching.StackExchangeRedis is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Changes from Previous Version

No structural changes between v10.0.0-rc.1.25451.107 and v10.0.0-rc.2.25502.107.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.