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

Provide Microsoft.Extensions.Caching.StackExchangeRedis package README #57785

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions src/Caching/StackExchangeRedis/src/PACKAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## 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

```shell
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:

```csharp
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](https://learn.microsoft.com/aspnet/core/performance/caching/distributed#distributed-redis-cache) 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](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/aspnetcore).
Loading