TCIS.Caching.Hybrid
1.0.0-rc.49
dotnet add package TCIS.Caching.Hybrid --version 1.0.0-rc.49
NuGet\Install-Package TCIS.Caching.Hybrid -Version 1.0.0-rc.49
<PackageReference Include="TCIS.Caching.Hybrid" Version="1.0.0-rc.49" />
<PackageVersion Include="TCIS.Caching.Hybrid" Version="1.0.0-rc.49" />
<PackageReference Include="TCIS.Caching.Hybrid" />
paket add TCIS.Caching.Hybrid --version 1.0.0-rc.49
#r "nuget: TCIS.Caching.Hybrid, 1.0.0-rc.49"
#:package TCIS.Caching.Hybrid@1.0.0-rc.49
#addin nuget:?package=TCIS.Caching.Hybrid&version=1.0.0-rc.49&prerelease
#tool nuget:?package=TCIS.Caching.Hybrid&version=1.0.0-rc.49&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.49)
- TCIS.Caching.InMemory (>= 1.0.0-rc.49)
- TCIS.Caching.Redis (>= 1.0.0-rc.49)
- TCIS.Core (>= 1.0.0-rc.49)
- TCIS.Logging.Abstractions (>= 1.0.0-rc.49)
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.49 | 45 | 9/18/2026 |
| 1.0.0-rc.47 | 41 | 9/17/2026 |
| 1.0.0-rc.46 | 35 | 9/17/2026 |
| 1.0.0-rc.45 | 57 | 9/11/2026 |
| 1.0.0-rc.44 | 61 | 9/10/2026 |
| 1.0.0-rc.43 | 60 | 9/10/2026 |
| 1.0.0-rc.42 | 72 | 9/9/2026 |
| 1.0.0-rc.41 | 59 | 9/9/2026 |
| 1.0.0-rc.40 | 74 | 9/8/2026 |
| 1.0.0-rc.39 | 72 | 9/3/2026 |
| 1.0.0-rc.38 | 63 | 9/3/2026 |
| 1.0.0-rc.37 | 75 | 8/27/2026 |
| 1.0.0-rc.36 | 79 | 8/27/2026 |
| 1.0.0-rc.35 | 70 | 8/26/2026 |
| 1.0.0-rc.34 | 70 | 8/26/2026 |
| 1.0.0-rc.33 | 64 | 8/21/2026 |
| 1.0.0-rc.32 | 69 | 8/21/2026 |
| 1.0.0-rc.31 | 67 | 8/21/2026 |
| 1.0.0-rc.30 | 66 | 8/21/2026 |
| 1.0.0-rc.29 | 63 | 8/21/2026 |