CleanArchitecture.Extensions.Caching
0.1.6
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CleanArchitecture.Extensions.Caching --version 0.1.6
NuGet\Install-Package CleanArchitecture.Extensions.Caching -Version 0.1.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CleanArchitecture.Extensions.Caching" Version="0.1.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CleanArchitecture.Extensions.Caching" Version="0.1.6" />
<PackageReference Include="CleanArchitecture.Extensions.Caching" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CleanArchitecture.Extensions.Caching --version 0.1.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CleanArchitecture.Extensions.Caching, 0.1.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CleanArchitecture.Extensions.Caching@0.1.6
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CleanArchitecture.Extensions.Caching&version=0.1.6
#tool nuget:?package=CleanArchitecture.Extensions.Caching&version=0.1.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CleanArchitecture.Extensions.Caching
Cache abstractions and MediatR-friendly behaviors for Clean Architecture apps (in progress).
- Provider-agnostic
ICacheand serializer/key abstractions planned for memory and distributed stores. - Default MemoryCache adapter is registered by <code>AddCleanArchitectureCaching</code>; a distributed adapter is available for <code>IDistributedCache</code> (resolve <code>DistributedCacheAdapter</code> or override <code>ICache</code> registration).
- Query caching behavior will plug into the MediatR pipeline without leaking infrastructure into handlers.
- Tenant-aware key conventions, stampede protection, and safe serialization defaults will align with the design blueprint.
- Ships with SourceLink, XML docs, and snupkg symbols like the other extensions once complete.
Status: design staged; implementation is being built incrementally. API surface may change before the first preview.
Planned usage
using CleanArchitecture.Extensions.Caching;
using CleanArchitecture.Extensions.Caching.Options;
using MediatR;
// Register caching services and options
services.AddCleanArchitectureCaching(options =>
{
options.Enabled = true;
options.DefaultNamespace = "MyApp";
});
// Wire the query caching behavior (ordering finalized in later steps)
services.AddMediatR(cfg =>
{
cfg.RegisterServicesFromAssemblyContaining<Program>();
cfg.AddCleanArchitectureCachingPipeline(); // place after Validation, before Performance
});
// Swap to distributed cache (e.g., Redis) by overriding ICache registration
services.AddStackExchangeRedisCache(redis => redis.Configuration = "<redis-connection>");
services.AddSingleton<ICache, DistributedCacheAdapter>();
Notes
- Keys follow
{namespace}:{tenant?}:{resource}:{hash}; overrideResourceNameSelector/HashFactoryto control the resource or hash inputs. QueryCachingBehaviorOptionslets you set TTL per request type, cache predicate, and bypass-on-error forResult<T>responses.- Default adapters: memory (
ICache) and a distributed adapter (DistributedCacheAdapter) for anyIDistributedCacheimplementation.
Target frameworks
- net10.0
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- CleanArchitecture.Extensions.Core (>= 0.1.6)
- MediatR (>= 14.0.0)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Caching.Memory (>= 10.0.0)
- Microsoft.Extensions.Logging (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CleanArchitecture.Extensions.Caching:
| Package | Downloads |
|---|---|
|
CleanArchitecture.Extensions.Multitenancy.Caching
Tenant-aware caching integration for Clean Architecture multitenancy, including cache scope binding and cache-scope warnings. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.9 | 107 | 1/13/2026 |
| 0.2.8 | 104 | 1/13/2026 |
| 0.2.7 | 106 | 1/13/2026 |
| 0.2.6 | 103 | 1/12/2026 |
| 0.2.5 | 114 | 1/8/2026 |
| 0.2.4 | 109 | 1/3/2026 |
| 0.2.3 | 126 | 1/1/2026 |
| 0.2.2 | 123 | 1/1/2026 |
| 0.2.1 | 115 | 12/29/2025 |
| 0.2.0 | 108 | 12/29/2025 |
| 0.1.8-preview.3 | 61 | 12/28/2025 |
| 0.1.7 | 130 | 12/26/2025 |
| 0.1.6 | 433 | 12/10/2025 |
| 0.1.6-preview.13 | 377 | 12/10/2025 |