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
                    
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="DamianH.Http.HybridCacheHandler" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DamianH.Http.HybridCacheHandler" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="DamianH.Http.HybridCacheHandler" />
                    
Project file
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 DamianH.Http.HybridCacheHandler --version 0.2.0
                    
#r "nuget: DamianH.Http.HybridCacheHandler, 0.2.0"
                    
#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 DamianH.Http.HybridCacheHandler@0.2.0
                    
#: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=DamianH.Http.HybridCacheHandler&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=DamianH.Http.HybridCacheHandler&version=0.2.0
                    
Install as a Cake Tool

DamianH.Http.HybridCacheHandler

NuGet Downloads

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; response Vary is enforced.
  • The default content limit is 10 MB. FallbackCacheDuration defaults to TimeSpan.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 ResponseHeadersRead and 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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