TCIS.Caching.Hybrid
1.0.0-rc.11
dotnet add package TCIS.Caching.Hybrid --version 1.0.0-rc.11
NuGet\Install-Package TCIS.Caching.Hybrid -Version 1.0.0-rc.11
<PackageReference Include="TCIS.Caching.Hybrid" Version="1.0.0-rc.11" />
<PackageVersion Include="TCIS.Caching.Hybrid" Version="1.0.0-rc.11" />
<PackageReference Include="TCIS.Caching.Hybrid" />
paket add TCIS.Caching.Hybrid --version 1.0.0-rc.11
#r "nuget: TCIS.Caching.Hybrid, 1.0.0-rc.11"
#:package TCIS.Caching.Hybrid@1.0.0-rc.11
#addin nuget:?package=TCIS.Caching.Hybrid&version=1.0.0-rc.11&prerelease
#tool nuget:?package=TCIS.Caching.Hybrid&version=1.0.0-rc.11&prerelease
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-rc.11)
- TCIS.Caching.InMemory (>= 1.0.0-rc.11)
- TCIS.Caching.Redis (>= 1.0.0-rc.11)
- TCIS.Core (>= 1.0.0-rc.11)
- TCIS.Logging.Abstractions (>= 1.0.0-rc.11)
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.0-rc.11 | 38 | 7/28/2026 |
| 1.0.0-rc.10 | 48 | 7/24/2026 |
| 1.0.0-rc.9 | 43 | 7/21/2026 |
| 1.0.0-rc.8 | 44 | 7/21/2026 |
| 1.0.0-rc.7 | 46 | 7/17/2026 |
| 1.0.0-rc.6 | 58 | 7/7/2026 |
| 1.0.0-rc.5 | 62 | 7/7/2026 |
| 1.0.0-rc.4 | 61 | 6/24/2026 |
| 1.0.0-rc.2 | 66 | 5/12/2026 |
| 1.0.0-rc.1 | 64 | 5/12/2026 |