Repository navigation
DamianH.Http.HybridCacheHandler 0.2.0
·
24 commits
to main
since this release
DamianH.Http.HybridCacheHandler is an RFC 9111 HTTP caching DelegatingHandler for HttpClient, built on .NET's HybridCache. 0.2.0 is a large release: a new package ID, new target frameworks, streaming large-body storage and many caching-semantics fixes.
dotnet add package DamianH.Http.HybridCacheHandler --version 0.2.0⚠️ Breaking changes and migration from 0.1.x
- New package ID. 0.1.x shipped as
DamianH.HttpHybridCacheHandler. It is nowDamianH.Http.HybridCacheHandler(#31). Update the package reference and yourusingdirectives together: the namespace is nowDamianH.Http.HybridCacheHandler. - Metrics meter name and keyed DI key are now
DamianH.Http.HybridCacheHandler. Update meter subscriptions and any literal service keys. - The
HttpHybridCacheHandlertype and theAddHttpHybridCacheHandlermethods are unchanged. DamianH.FileDistributedCacheis no longer released with this package; it is versioned separately.
New
- Streaming large-body caching (#19, #23). Response bodies above a size threshold stream into an external content store instead of the
HybridCachepayload, using bounded memory and disk staging, incremental hashing and optional gzip. HTTP metadata and small bodies stay inHybridCache. If no content store is configured, behaviour stays HybridCache-only. Content stores are separate packages, all released at 0.2.0: netstandard2.0andnet472targets alongsidenet10.0(#27). The modern API is unchanged. Some legacy-target header text and grouping may be normalized. Microsoft.Extensions.Caching.Hybrid's upstreamnet472"untested" warning still applies.
RFC 9111 fixes
- Stored headers are replayed verbatim in cached responses (#9).
- Cached responses are invalidated after successful unsafe methods (#10).
- Client conditional requests (
If-None-Match,If-Modified-Since) are honoured on cache hits (#11). Varymatching on cache hits is fixed (#12).- Freshness and
Ageedge cases are fixed (#13). HybridCacheMaximumPayloadBytesis aligned withMaxCacheableContentSize(#17).- 304 revalidation header updates are fixed (#18).
Quality
- An RFC 9111 conformance suite based on the HTTP cache tests (#1, #15, #18). It passes 344 of 365 cases on
net10.0. SendAsynccache-flow deduplication is refactored (#20), and benchmark allocations are isolated (#24).- Dependencies are updated (#14).
Documentation
Overview · Configuration · Cache behaviour · Content stores · Compatibility · Metrics