Cirreum.Cache.Distributed
1.0.8
dotnet add package Cirreum.Cache.Distributed --version 1.0.8
NuGet\Install-Package Cirreum.Cache.Distributed -Version 1.0.8
<PackageReference Include="Cirreum.Cache.Distributed" Version="1.0.8" />
<PackageVersion Include="Cirreum.Cache.Distributed" Version="1.0.8" />
<PackageReference Include="Cirreum.Cache.Distributed" />
paket add Cirreum.Cache.Distributed --version 1.0.8
#r "nuget: Cirreum.Cache.Distributed, 1.0.8"
#:package Cirreum.Cache.Distributed@1.0.8
#addin nuget:?package=Cirreum.Cache.Distributed&version=1.0.8
#tool nuget:?package=Cirreum.Cache.Distributed&version=1.0.8
Cirreum.Cache.Distributed
Distributed caching adapter for Cirreum's cache service
Supersedes the legacy
Cirreum.QueryCache.Distributedpackage. The lineage moved to a new package id alongside the Cirreum 1.0 foundation reset and the code-first caching model.
Overview
Cirreum.Cache.Distributed provides a distributed caching implementation for the Cirreum Conductor framework by adapting ASP.NET Core's IDistributedCache interface to Cirreum's ICacheService. This enables caching of query results across multiple application instances using any distributed cache provider (Redis, SQL Server, NCache, etc.).
Installation
dotnet add package Cirreum.Cache.Distributed
Usage
// In your Startup.cs or Program.cs
services.AddStackExchangeRedisCache(options =>
{
options.Configuration = "localhost:6379";
});
// Add Cirreum distributed query caching
services.AddDistributedCacheService();
The service automatically registers as a singleton implementation of ICacheService and uses the configured IDistributedCache for storage.
Configuration Options
Serialization uses System.Text.Json. To customize it, register a JsonSerializerOptions
in DI before adding the cache service — the adapter picks it up automatically, and falls back
to defaults when none is registered:
services.AddSingleton(new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
});
services.AddDistributedCacheService();
Features
- Distributed Cache Integration: Works with any
IDistributedCacheimplementation - JSON Serialization: Configurable JSON serialization for cached objects
- Failure Expiration: Supports different cache durations for failed results
- Async Operations: Fully async with
CancellationTokensupport - Conductor Integration: Seamlessly integrates with Cirreum Conductor's caching pipeline
Limitations
- No Tag-Based Eviction: The
RemoveByTagAsyncandRemoveByTagsAsyncmethods are not supported due toIDistributedCachelimitations. These methods will throwNotSupportedException. - Requires External Cache: This package doesn't provide a distributed cache implementation. You must configure one separately (e.g., Redis, SQL Server, NCache).
Requirements
- .NET 10.0 or later
- Cirreum.Domain 1.x or later
- A configured
IDistributedCacheimplementation
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.Cache.Distributed follows Semantic Versioning:
- Major - Breaking API changes
- Minor - New features, backward compatible
- Patch - Bug fixes, backward compatible
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.Domain (>= 1.3.1)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.