Soenneker.Redis.Client
4.0.2302
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Redis.Client --version 4.0.2302
NuGet\Install-Package Soenneker.Redis.Client -Version 4.0.2302
<PackageReference Include="Soenneker.Redis.Client" Version="4.0.2302" />
<PackageVersion Include="Soenneker.Redis.Client" Version="4.0.2302" />
<PackageReference Include="Soenneker.Redis.Client" />
paket add Soenneker.Redis.Client --version 4.0.2302
#r "nuget: Soenneker.Redis.Client, 4.0.2302"
#:package Soenneker.Redis.Client@4.0.2302
#addin nuget:?package=Soenneker.Redis.Client&version=4.0.2302
#tool nuget:?package=Soenneker.Redis.Client&version=4.0.2302
Soenneker.Redis.Client
Provides shared, lazily connected StackExchange.Redis ConnectionMultiplexer instances through dependency injection.
Installation
dotnet add package Soenneker.Redis.Client
Configuration
The parameterless Get() overload reads the connection string from configuration:
{
"Azure": {
"Redis": {
"ConnectionString": "localhost:6379,abortConnect=false"
}
}
}
Alternatively, pass a StackExchange.Redis connection string directly to Get(connectionString).
Registration and use
using Microsoft.Extensions.DependencyInjection;
using Soenneker.Redis.Client.Abstract;
using Soenneker.Redis.Client.Registrars;
using StackExchange.Redis;
services.AddRedisClientAsSingleton();
IRedisClient redisClient = serviceProvider.GetRequiredService<IRedisClient>();
ConnectionMultiplexer multiplexer = await redisClient.Get(cancellationToken);
IDatabase database = multiplexer.GetDatabase();
await database.StringSetAsync("orders:42:status", "ready");
RedisValue status = await database.StringGetAsync("orders:42:status");
The singleton registration is the normal choice: ConnectionMultiplexer is designed to be shared. Each distinct connection string is connected once and cached for the lifetime of IRedisClient. The scoped registrar is available when a scope must own and dispose its own connection cache.
Administrative Redis commands remain disabled unless the supplied connection string explicitly includes allowAdmin=true.
| 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
- Soenneker.Dictionaries.Singletons (>= 4.0.87)
- Soenneker.Extensions.Configuration (>= 4.0.868)
- StackExchange.Redis (>= 3.1.31)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Soenneker.Redis.Client:
| Package | Downloads |
|---|---|
|
Soenneker.Redis.Util
The general purpose utility library leveraging Redis for all of your caching needs |
|
|
Soenneker.Redis.Client.Server
A utility library for Redis server client accessibility |
|
|
Soenneker.Deduplication.Redis
Distributed duplicate suppression backed by Redis. |
|
|
Soenneker.Redis.Dump
Redis database export, import, and copy utilities for .NET |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.2303 | 0 | 8/30/2026 |
| 4.0.2302 | 0 | 8/30/2026 |
| 4.0.2301 | 0 | 8/30/2026 |
| 4.0.2300 | 0 | 8/30/2026 |
| 4.0.2299 | 30 | 8/30/2026 |
| 4.0.2298 | 45 | 8/30/2026 |
| 4.0.2297 | 97 | 8/29/2026 |
| 4.0.2296 | 77 | 8/29/2026 |
| 4.0.2295 | 60 | 8/29/2026 |
| 4.0.2294 | 662 | 8/26/2026 |
| 4.0.2293 | 221 | 8/26/2026 |
| 4.0.2292 | 186 | 8/26/2026 |
| 4.0.2291 | 665 | 8/22/2026 |
| 4.0.2290 | 519 | 8/21/2026 |
| 4.0.2289 | 482 | 8/21/2026 |
| 4.0.2288 | 940 | 8/18/2026 |
| 4.0.2287 | 313 | 8/18/2026 |
| 4.0.2286 | 1,289 | 8/13/2026 |
| 4.0.2285 | 204 | 8/13/2026 |
| 4.0.2284 | 365 | 8/12/2026 |
Document Redis connection sharing safely