Cirreum.QueryCache.Hybrid
1.0.24
dotnet add package Cirreum.QueryCache.Hybrid --version 1.0.24
NuGet\Install-Package Cirreum.QueryCache.Hybrid -Version 1.0.24
<PackageReference Include="Cirreum.QueryCache.Hybrid" Version="1.0.24" />
<PackageVersion Include="Cirreum.QueryCache.Hybrid" Version="1.0.24" />
<PackageReference Include="Cirreum.QueryCache.Hybrid" />
paket add Cirreum.QueryCache.Hybrid --version 1.0.24
#r "nuget: Cirreum.QueryCache.Hybrid, 1.0.24"
#:package Cirreum.QueryCache.Hybrid@1.0.24
#addin nuget:?package=Cirreum.QueryCache.Hybrid&version=1.0.24
#tool nuget:?package=Cirreum.QueryCache.Hybrid&version=1.0.24
Cirreum.QueryCache.Hybrid
Hybrid caching implementation for Conductor Cacheable Queries
Overview
Cirreum.QueryCache.Hybrid provides a hybrid caching implementation that bridges Microsoft's HybridCache service with Cirreum's Conductor framework for cacheable queries.
This library implements the ICacheableQueryService interface using Microsoft's new HybridCache infrastructure, enabling automatic caching of query results with support for both local and distributed cache layers, tag-based invalidation, and failure-specific expiration policies.
Features
- Hybrid Caching: Leverages Microsoft's
HybridCachefor optimal performance across local and distributed cache layers - Tag-Based Invalidation: Support for cache invalidation using tags for related data
- Failure Handling: Configurable expiration times for failed operations to prevent cache stampedes
- Result-Aware Caching: Special handling for
IResultresponses with automatic failure detection - Simple Integration: Single extension method for DI container registration
Installation
dotnet add package Cirreum.QueryCache.Hybrid
Usage
Basic Setup
using Cirreum.QueryCache.Hybrid.Extensions;
// Register services
services.AddHybridCache(); // Microsoft's HybridCache service
services.AddHybridQueryCaching(); // This library's implementation
Query Implementation
public record GetUserQuery(int UserId) : ICacheableQuery<User>
{
public QueryCacheSettings CacheSettings => new()
{
Expiration = TimeSpan.FromMinutes(15),
LocalExpiration = TimeSpan.FromMinutes(5),
FailureExpiration = TimeSpan.FromMinutes(1)
};
public string[] CacheTags => [$"user:{UserId}"];
}
The HybridCacheableQueryService automatically handles:
- Cache key generation
- Cache-or-create patterns
- Failure result caching with shorter expiration
- Tag-based cache invalidation
Contribution Guidelines
Be conservative with new abstractions
The API surface must remain stable and meaningful.Limit dependency expansion
Only add foundational, version-stable dependencies.Favor additive, non-breaking changes
Breaking changes ripple through the entire ecosystem.Include thorough unit tests
All primitives and patterns should be independently testable.Document architectural decisions
Context and reasoning should be clear for future maintainers.Follow .NET conventions
Use established patterns from Microsoft.Extensions.* libraries.
Versioning
Cirreum.QueryCache.Hybrid follows Semantic Versioning:
- Major - Breaking API changes
- Minor - New features, backward compatible
- Patch - Bug fixes, backward compatible
Given its foundational role, major version bumps are rare and carefully considered.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Cirreum Foundation Framework
Layered simplicity for modern .NET
| 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
- Cirreum.Core (>= 1.0.40)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.2)
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.24 | 93 | 2/5/2026 |
| 1.0.23 | 99 | 1/23/2026 |
| 1.0.22 | 93 | 1/22/2026 |
| 1.0.21 | 87 | 1/21/2026 |
| 1.0.20 | 93 | 1/12/2026 |
| 1.0.19 | 102 | 1/11/2026 |
| 1.0.18 | 96 | 1/5/2026 |
| 1.0.17 | 95 | 1/5/2026 |
| 1.0.16 | 101 | 1/2/2026 |
| 1.0.15 | 94 | 1/1/2026 |
| 1.0.14 | 97 | 12/30/2025 |
| 1.0.12 | 88 | 12/29/2025 |
| 1.0.11 | 90 | 12/29/2025 |
| 1.0.10 | 97 | 12/29/2025 |
| 1.0.9 | 92 | 12/29/2025 |
| 1.0.8 | 179 | 12/22/2025 |
| 1.0.7 | 109 | 12/20/2025 |
| 1.0.6 | 275 | 12/16/2025 |
| 1.0.5 | 176 | 12/5/2025 |
| 1.0.4 | 423 | 12/1/2025 |