CodeBrix.Redis.MitLicenseForever
1.0.259.407
dotnet add package CodeBrix.Redis.MitLicenseForever --version 1.0.259.407
NuGet\Install-Package CodeBrix.Redis.MitLicenseForever -Version 1.0.259.407
<PackageReference Include="CodeBrix.Redis.MitLicenseForever" Version="1.0.259.407" />
<PackageVersion Include="CodeBrix.Redis.MitLicenseForever" Version="1.0.259.407" />
<PackageReference Include="CodeBrix.Redis.MitLicenseForever" />
paket add CodeBrix.Redis.MitLicenseForever --version 1.0.259.407
#r "nuget: CodeBrix.Redis.MitLicenseForever, 1.0.259.407"
#:package CodeBrix.Redis.MitLicenseForever@1.0.259.407
#addin nuget:?package=CodeBrix.Redis.MitLicenseForever&version=1.0.259.407
#tool nuget:?package=CodeBrix.Redis.MitLicenseForever&version=1.0.259.407
CodeBrix.Redis
A high-performance, fully managed Redis client for .NET, incorporating both synchronous and
asynchronous usage. One assembly covers the whole stack: the RESP protocol reader and writer, the
connection multiplexer and its cluster / sentinel / replica awareness, the full command surface,
and the Redlock distributed-lock algorithm. CodeBrix.Redis is provided as a .NET 10 library and
associated CodeBrix.Redis.MitLicenseForever NuGet package.
CodeBrix.Redis supports applications and assemblies that target Microsoft .NET version 10.0 and later. Microsoft .NET version 10.0 is a Long-Term Supported (LTS) version of .NET, and was released on Nov 11, 2025; and will be actively supported by Microsoft until Nov 14, 2028. Please update your C#/.NET code and projects to the latest LTS version of Microsoft .NET.
Installation
dotnet add package CodeBrix.Redis.MitLicenseForever
Note that the NuGet package ID and the namespace are different - there is no package named plain CodeBrix.Redis:
- NuGet package ID:
CodeBrix.Redis.MitLicenseForever - Assembly and primary namespace:
CodeBrix.Redis- i.e.using CodeBrix.Redis;
XML documentation (IntelliSense) ships alongside the assembly.
The package pulls in exactly two dependencies, both published by Microsoft; no version pinning is needed in the consuming project:
Microsoft.Extensions.Logging.Abstractions- itsILoggerFactoryis part of the public surface, throughConfigurationOptions.LoggerFactorySystem.IO.Hashing- the hashing behind cluster hash-slot routing
Roslyn analyzers, and their code fixes for the IDE, install themselves along with the package. They are compile-time only, and nothing about them reaches your output.
CodeBrix.Redis supports:
- Connection multiplexing — one
ConnectionMultiplexershared across an entire application, with automatic reconnection, a configurable backlog policy, and connection-event notifications - Every server topology — standalone, primary/replica, Redis Cluster (with hash-slot routing
and
MOVED/ASKfollowing), and Sentinel-managed failover - The full command surface — strings, hashes, lists, sets, sorted sets, bitmaps, HyperLogLog, geospatial indexes, streams, and vector sets, each in synchronous and asynchronous form
- RESP2 and RESP3, negotiated with
HELLO, including RESP3 push messages - Publish/subscribe, including
ChannelMessageQueuefor ordered, sequential consumption and keyspace notifications - Transactions and batches —
ITransactionwithConditionpreconditions, andIBatchfor pipelined non-atomic sends - Lua scripting —
LuaScriptwith named-parameter mapping, script caching, andEVALSHA - Key-space isolation — a prefixed
IDatabaseview, so several logical applications can share one Redis database without colliding - Profiling and diagnostics — per-command profiling sessions, connection counters, storm logs,
and an
ILoggerFactoryhook for connection logging - A low-level RESP layer (namespace
CodeBrix.Redis.Respite) usable on its own, for talking RESP to something that is not Redis - The Redlock distributed-lock algorithm (namespace
CodeBrix.Redis.RedLock) across independent Redis instances, with lock extension and expiry - Roslyn analyzers shipped in the package — compile-time transaction and queued-result diagnostics, with code fixes in the IDE
Sample Code
Connect, and read and write a value
using CodeBrix.Redis;
using var multiplexer = await ConnectionMultiplexer.ConnectAsync("localhost:6379");
IDatabase db = multiplexer.GetDatabase();
await db.StringSetAsync("greeting", "hello world");
RedisValue value = await db.StringGetAsync("greeting");
Console.WriteLine(value); // hello world
Take a distributed lock
using CodeBrix.Redis;
using CodeBrix.Redis.RedLock;
using CodeBrix.Redis.RedLock.Configuration;
using var multiplexer = await ConnectionMultiplexer.ConnectAsync("localhost:6379");
using var factory = RedLockFactory.Create([new RedLockMultiplexer(multiplexer)]);
await using var redLock = await factory.CreateLockAsync(
resource: "order-42",
expiryTime: TimeSpan.FromSeconds(30));
if (redLock.IsAcquired)
{
// exclusive work here
}
Documentation
The NuGet package includes AGENT-README.txt, a complete API reference and usage guide written for AI coding agents - point your agent at that file when it is writing code against this library.
Additional sample code and usage examples are available in the CodeBrix.Redis.Tests project:
https://github.com/ellisnet/CodeBrix.Redis/tree/main/tests/CodeBrix.Redis.Tests
License
CodeBrix.Redis is licensed under the MIT License - see the LICENSE file.
For licensing and provenance information about the open source code included in this package, see THIRD-PARTY-NOTICES.txt.
| 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.Logging.Abstractions (>= 10.0.12)
- System.IO.Hashing (>= 10.0.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.259.407 | 91 | 9/16/2026 |
| 1.0.254.1168 | 103 | 9/11/2026 |
| 1.0.245.159 | 132 | 9/2/2026 |