DamianH.Http.HybridCacheHandler
0.2.0
dotnet add package DamianH.Http.HybridCacheHandler --version 0.2.0
NuGet\Install-Package DamianH.Http.HybridCacheHandler -Version 0.2.0
<PackageReference Include="DamianH.Http.HybridCacheHandler" Version="0.2.0" />
<PackageVersion Include="DamianH.Http.HybridCacheHandler" Version="0.2.0" />
<PackageReference Include="DamianH.Http.HybridCacheHandler" />
paket add DamianH.Http.HybridCacheHandler --version 0.2.0
#r "nuget: DamianH.Http.HybridCacheHandler, 0.2.0"
#:package DamianH.Http.HybridCacheHandler@0.2.0
#addin nuget:?package=DamianH.Http.HybridCacheHandler&version=0.2.0
#tool nuget:?package=DamianH.Http.HybridCacheHandler&version=0.2.0
DamianH.Http.HybridCacheHandler
RFC 9111 client-side HTTP caching for HttpClient, backed by .NET HybridCache
for L1 memory and optional L2 distributed storage.
Full documentation is the authoritative guide for configuration, behavior, metrics, and limitations.
Naming migration
The package IDs, assembly names, and namespaces now use
DamianH.Http.HybridCacheHandler, including all ContentStore packages.
Update package references and using directives together. The
HttpHybridCacheHandler type and AddHttpHybridCacheHandler methods are unchanged.
The metrics meter name and keyed DI registration key also use the new name;
update meter subscriptions and any literal registration keys.
Frameworks
The handler and all five content-store packages ship net10.0,
netstandard2.0, and net472 assets. Samples and the separate FileDistributedCache
product remain .NET 10. .NET Standard is a library target, not a runtime.
Older-target headers can be normalized by public enumeration. Framework apps
should enable automatic binding redirects and use HttpClientHandler with
GZip/Deflate decompression instead of the modern handler example below.
Upstream support warning: HybridCache 10.8.0 warns that net472 is
unsupported/untested upstream. That warning is not suppressed; this repository's
coverage does not change Microsoft's support policy. Framework tests run on
the installed Windows runtime, commonly 4.8, not necessarily an actual 4.7.2 runtime.
See framework compatibility.
Install and start (.NET 10)
From your application project directory:
dotnet add package DamianH.Http.HybridCacheHandler
services.AddHttpHybridCacheHandler();
services.AddHttpClient("CachedClient")
.ConfigurePrimaryHttpMessageHandler(() => new SocketsHttpHandler
{
AutomaticDecompression = DecompressionMethods.All,
PooledConnectionLifetime = TimeSpan.FromMinutes(5),
PooledConnectionIdleTimeout = TimeSpan.FromMinutes(2)
})
.AddHttpMessageHandler(sp => sp.GetRequiredService<HttpHybridCacheHandler>());
Important defaults and safety
- Default mode is
CacheMode.Private, not shared proxy caching. Choose shared mode and authentication partitioning deliberately; responseVaryis enforced. - The default content limit is 10 MB.
FallbackCacheDurationdefaults toTimeSpan.MinValue: responses without caching headers are not cached by default. - Use automatic decompression. See the pipeline guide for resilience and authentication ordering.
- Optional external body stores require explicit setup and operator-owned
retention. Streaming requires
ResponseHeadersReadand response consumption/ disposal; early disposal or cancellation does not fill the cache. Concurrent streaming misses do not share a live origin stream. Do not eagerly delete shared bodies when invalidating one URI. - Provision a trusted private staging parent, even when using the system temp default. On Windows the handler inherits, but does not restrict or validate, its ACLs; unique spool directories and leases are not access control.
Guides
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- DamianH.Http.HybridCacheHandler.ContentStore (>= 0.1.0)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.10)
- Microsoft.Bcl.TimeProvider (>= 10.0.10)
- Microsoft.Extensions.Caching.Hybrid (>= 10.8.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- System.Diagnostics.DiagnosticSource (>= 10.0.10)
- System.Memory (>= 4.6.3)
- System.Threading.Tasks.Extensions (>= 4.6.3)
-
.NETStandard 2.0
- DamianH.Http.HybridCacheHandler.ContentStore (>= 0.1.0)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.10)
- Microsoft.Bcl.TimeProvider (>= 10.0.10)
- Microsoft.Extensions.Caching.Hybrid (>= 10.8.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- System.Diagnostics.DiagnosticSource (>= 10.0.10)
- System.Memory (>= 4.6.3)
- System.Threading.Tasks.Extensions (>= 4.6.3)
-
net10.0
- DamianH.Http.HybridCacheHandler.ContentStore (>= 0.1.0)
- Microsoft.Extensions.Caching.Hybrid (>= 10.8.0)
- Microsoft.Extensions.DependencyInjection.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.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0 | 35 | 10/14/2026 |