Naravel.Cache.Redis 0.2.0

dotnet add package Naravel.Cache.Redis --version 0.2.0
                    
NuGet\Install-Package Naravel.Cache.Redis -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Naravel.Cache.Redis" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Naravel.Cache.Redis" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Naravel.Cache.Redis" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Naravel.Cache.Redis --version 0.2.0
                    
#r "nuget: Naravel.Cache.Redis, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Naravel.Cache.Redis@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Naravel.Cache.Redis&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Naravel.Cache.Redis&version=0.2.0
                    
Install as a Cake Tool

Naravel.Cache.Redis

NuGet Downloads .NET 10 License: MIT

Redis cache and distributed-lock providers for Naravel.Cache.

Fact Detail
Install dotnet add package Naravel.Cache.Redis
Targets .NET 10
Needs Naravel.Cache and Naravel.Redis, which NuGet installs with it
Client StackExchange.Redis, through the connections that Naravel.Redis owns

What you get

  • One cache for every instance. Name "Driver": "redis" in a store, and all instances read and write the same keys.
  • Distributed locks. Acquisition is an atomic SET NX, and release compares the token before it deletes.
  • Flush stays inside the store. FlushAsync removes only the keys under the store's Prefix.
  • Counters in one step. IncrementAsync with a TTL sets the first expiry in the same Lua operation.
  • One connection per server. The store and its lock borrow the connection that Naravel.Redis owns, and equal connection strings share one.

Quick start

builder.Services.AddNaravelCache(builder.Configuration).AddNaravelRedisCache(builder.Configuration);
{ "Cache": { "Default": "redis", "Stores": { "redis": { "Driver": "redis", "ConnectionString": "localhost:6379" } } } }

Inject ICacheStore as usual; it now reads and writes Redis. When other Naravel modules use the same Redis server, name a shared connection with Connection instead of ConnectionString (see Naravel.Redis).

Package Adds
Naravel.Cache Named stores, tags, scopes and locks that this provider backs
Naravel.Redis Named, shared Redis connections that the store borrows

Learn more

Part of Naravel: Laravel's names, .NET's type system. All Naravel packages share one version.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.2.0 257 11/13/2026
0.1.1 101 11/2/2026
0.1.0 108 11/1/2026