Skip to content

DamianH.Http.HybridCacheHandler 0.2.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 07:22
· 24 commits to main since this release
5526def

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 now DamianH.Http.HybridCacheHandler (#31). Update the package reference and your using directives together: the namespace is now DamianH.Http.HybridCacheHandler.
  • Metrics meter name and keyed DI key are now DamianH.Http.HybridCacheHandler. Update meter subscriptions and any literal service keys.
  • The HttpHybridCacheHandler type and the AddHttpHybridCacheHandler methods are unchanged.
  • DamianH.FileDistributedCache is 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 HybridCache payload, using bounded memory and disk staging, incremental hashing and optional gzip. HTTP metadata and small bodies stay in HybridCache. If no content store is configured, behaviour stays HybridCache-only. Content stores are separate packages, all released at 0.2.0:
  • netstandard2.0 and net472 targets alongside net10.0 (#27). The modern API is unchanged. Some legacy-target header text and grouping may be normalized. Microsoft.Extensions.Caching.Hybrid's upstream net472 "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).
  • Vary matching on cache hits is fixed (#12).
  • Freshness and Age edge cases are fixed (#13).
  • HybridCache MaximumPayloadBytes is aligned with MaxCacheableContentSize (#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.
  • SendAsync cache-flow deduplication is refactored (#20), and benchmark allocations are isolated (#24).
  • Dependencies are updated (#14).

Documentation

Overview · Configuration · Cache behaviour · Content stores · Compatibility · Metrics