Naravel.Redis
0.2.0
dotnet add package Naravel.Redis --version 0.2.0
NuGet\Install-Package Naravel.Redis -Version 0.2.0
<PackageReference Include="Naravel.Redis" Version="0.2.0" />
<PackageVersion Include="Naravel.Redis" Version="0.2.0" />
<PackageReference Include="Naravel.Redis" />
paket add Naravel.Redis --version 0.2.0
#r "nuget: Naravel.Redis, 0.2.0"
#:package Naravel.Redis@0.2.0
#addin nuget:?package=Naravel.Redis&version=0.2.0
#tool nuget:?package=Naravel.Redis&version=0.2.0
Naravel.Redis
Named, shared Redis connections for Naravel modules: one StackExchange.Redis multiplexer per name, owned and disposed by one manager.
| Fact | Detail |
|---|---|
| Install | dotnet add package Naravel.Redis |
| Targets | .NET 10 |
| Needs | Naravel.Foundation, which NuGet installs with it (StackExchange.Redis comes with the package) |
| Used by | Naravel.Cache.Redis and Naravel.Queue.Redis borrow their connection from it |
What you get
- Named connections. Each store under
Redis:Stores:<name>is aConnectionString;Connection()returns the default andConnection("name")another. - The real StackExchange.Redis. You get the
IConnectionMultiplexer; commands are never wrapped. - One owner. One multiplexer per name, owned and disposed by one manager.
Quick start
{ "Redis": { "Default": "main", "Stores": { "main": { "ConnectionString": "localhost:6379" } } } }
using Naravel.Redis;
builder.Services.AddNaravelRedis(builder.Configuration);
app.MapPost("/visits", async (RedisManager redis) =>
{
var db = redis.Connection().Multiplexer.GetDatabase(); // the real StackExchange.Redis IDatabase
return Results.Ok(new { count = await db.StringIncrementAsync("visits") });
});
Learn more
- Redis: English guide
- Changelog · Source and issues · MIT license
Part of Naravel: Laravel's names, .NET's type system. All Naravel packages share one version.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.14)
- Naravel.Foundation (>= 0.2.0)
- StackExchange.Redis (>= 3.4.31)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Naravel.Redis:
| Package | Downloads |
|---|---|
|
Naravel.Queue.Redis
Redis queue driver for Naravel.Queue, built on StackExchange.Redis - priority buckets, delayed jobs and automatic reclaim of jobs left behind by a crashed worker. |
|
|
Naravel.Cache.Redis
Redis cache and distributed-lock providers for Naravel.Cache. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Release notes: https://github.com/km-arc/Naravel/releases/tag/v0.2.0 - full history: https://github.com/km-arc/Naravel/blob/main/CHANGELOG.md