Skip to content

Prototype HttpCache as a Client middleware #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

adamziel
Copy link
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