Skip to content

Prototype HttpCache as a Client middleware#18

Draft
adamziel wants to merge 8 commits intotrunkfrom
http-cache-as-a-middleware
Draft

Prototype HttpCache as a Client middleware#18
adamziel wants to merge 8 commits intotrunkfrom
http-cache-as-a-middleware

Conversation

@adamziel
Copy link
Copy Markdown
Contributor

@adamziel adamziel commented May 24, 2025

Work in progress, do not merge.

Introduces a CacheClient class that wraps Client to cache HTTP responses locally. It supports:

  • Request headers: If-None-Match, If-Modified-Since
  • Response headers: cache-control, etag, vary, last-modified, expires, max-age, s-maxage
  • 304 responses
  • Cache invalidation

Remaining work

This PR works, but is left as a draft until someone provides a compelling use-case. Once that happens, we'll need to:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant