Microsoft.Extensions.Caching.StackExchangeRedis 10.0.0
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 RedisRedisCacheOptions: Provides options used for configuring aRedisCache
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.
Showing the top 20 packages that depend on Microsoft.Extensions.Caching.StackExchangeRedis.
| Packages |
|---|
|
EFCoreSecondLevelCacheInterceptor
Entity Framework Core Second Level Caching Library.
|
.NET Framework 4.6.2
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- StackExchange.Redis (>= 2.7.27)
.NET 10.0
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- StackExchange.Redis (>= 2.7.27)
.NET Standard 2.0
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- StackExchange.Redis (>= 2.7.27)