TCIS.Caching.Hybrid
1.0.0
See the version list below for details.
dotnet add package TCIS.Caching.Hybrid --version 1.0.0
NuGet\Install-Package TCIS.Caching.Hybrid -Version 1.0.0
<PackageReference Include="TCIS.Caching.Hybrid" Version="1.0.0" />
<PackageVersion Include="TCIS.Caching.Hybrid" Version="1.0.0" />
<PackageReference Include="TCIS.Caching.Hybrid" />
paket add TCIS.Caching.Hybrid --version 1.0.0
#r "nuget: TCIS.Caching.Hybrid, 1.0.0"
#:package TCIS.Caching.Hybrid@1.0.0
#addin nuget:?package=TCIS.Caching.Hybrid&version=1.0.0
#tool nuget:?package=TCIS.Caching.Hybrid&version=1.0.0
TCIS.Caching.Hybrid
A Hybrid Caching solution (two-tier - L1/L2 Cache) for TCIS. Combines the instant speed of an In-Memory Cache (L1) with the distributed synchronization of a Redis Cache (L2). Features built-in Invalidation via Redis Pub/Sub (Backplane) to ensure L1 data remains synchronized across nodes when changes occur.
📦 Installation
Add the package to your project:
dotnet add package TCIS.Caching.Hybrid
(This package depends on both TCIS.Caching.InMemory and TCIS.Caching.Redis)
⚙️ Configuration (appsettings.json)
You need to configure InMemoryConfigs, RedisConfigs, as well as the specific HybridConfigs:
{
"InMemoryConfigs": {
"Enabled": true,
"SizeLimit": 2048
},
"RedisConfigs": {
"Enabled": true,
"Host": "localhost",
"Port": 6379
},
"HybridConfigs": {
"Enabled": true,
"HideErrors": true,
"EnableInvalidation": true,
"InvalidationChannel": "tcis:cache:invalidation"
}
}
🚀 Registration / Setup (Dependency Injection)
In Program.cs, register using AddTHybridCaching:
// Register the Hybrid Caching architecture
builder.Services.AddTHybridCaching(builder.Configuration);
💡 Features and Workflow
When you inject ICacheService and use it in Hybrid mode:
- Read (
GetAsync): The system checks the In-Memory cache (L1) first. If there's a cache miss, it checks Redis (L2). If L2 also misses, it will execute the factory function and store the result in both L1 and L2. - Write/Update (
SetAsync): New data is updated in both Redis (L2) and the current node's In-Memory cache (L1). - Synchronization (Invalidation): Whenever an update occurs, a message (cache change notification) is broadcasted via Redis Pub/Sub (
InvalidationChannel). Other nodes receiving this message will automatically remove or update their In-Memory (L1) version, keeping the entire system synchronized!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Microsoft.Extensions.Caching.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 8.0.11)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- Polly (>= 8.5.1)
- StackExchange.Redis (>= 2.8.41)
- TCIS.Caching (>= 1.0.0)
- TCIS.Caching.InMemory (>= 1.0.0)
- TCIS.Caching.Redis (>= 1.0.0)
- TCIS.Core (>= 1.0.0)
- TCIS.Logging.Abstractions (>= 1.0.0)
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.1-rc.10 | 49 | 10/8/2026 |
| 1.0.1-rc.9 | 35 | 10/8/2026 |
| 1.0.1-rc.8 | 41 | 10/8/2026 |
| 1.0.1-rc.7 | 40 | 10/8/2026 |
| 1.0.1-rc.6 | 49 | 10/8/2026 |
| 1.0.1-rc.5 | 40 | 10/7/2026 |
| 1.0.1-rc.4 | 40 | 10/7/2026 |
| 1.0.1-rc.3 | 47 | 10/7/2026 |
| 1.0.1-rc.2 | 49 | 10/5/2026 |
| 1.0.1-rc.1 | 54 | 10/5/2026 |
| 1.0.0 | 100 | 10/1/2026 |
| 1.0.0-rc.52 | 60 | 9/29/2026 |
| 1.0.0-rc.51 | 63 | 9/23/2026 |
| 1.0.0-rc.50 | 65 | 9/21/2026 |
| 1.0.0-rc.49 | 75 | 9/18/2026 |
| 1.0.0-rc.47 | 64 | 9/17/2026 |
| 1.0.0-rc.46 | 59 | 9/17/2026 |
| 1.0.0-rc.45 | 76 | 9/11/2026 |
| 1.0.0-rc.44 | 69 | 9/10/2026 |
| 1.0.0-rc.43 | 71 | 9/10/2026 |