8000 docs: Update HTTP cache references to RFC 9111 compliant implementation by bartventer · Pull Request #3608 · google/go-github · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

docs: Update HTTP cache references to RFC 9111 compliant implementation #3608

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

Merged
merged 2 commits into from
Jun 27, 2025

Conversation

bartventer
Copy link
Contributor

This PR updates the documentation and example code to recommend bartventer/httpcache instead of gregjones/httpcache. bartventer/httpcache is actively maintained and complies with RFC 9111 HTTP Caching.

Motivation

bartventer/httpcache implements RFC 9111 §4.1, including proper normalization of Vary headers and URIs when generating cache keys. This covers recommended normalization steps from RFC 7230 §2.7.3 and RFC 3986 §6. In contrast, gregjones/httpcache uses (*url.URL).String() as the cache key, which means it cannot support Vary-based caching and may produce unpredictable caching behaviour for requests that differ by query parameters, fragments, or other URI components.

Additionally, bartventer/httpcache also:

  • Supports stale-while-revalidate and the immutable cache-control extension.
  • Caches a wider range of HTTP status codes, including 200, 203, 301, 304, 308, 404, 405, 410, 414, and 501.
  • Adds a detailed cache status header (X-Httpcache-Status) for easier debugging and monitoring (HIT, MISS, STALE, REVALIDATED, BYPASS).
  • Maintains compatibility with the legacy X-From-Cache header for drop-in replacement.

Copy link
codecov bot commented Jun 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.34%. Comparing base (a2e5acc) to head (2b725f0).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3608   +/-   ##
=======================================
  Coverage   91.34%   91.34%           
=======================================
  Files         184      184           
  Lines       16180    16180           
=======================================
  Hits        14779    14779           
  Misses       1227     1227           
  Partials      174      174           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator
@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for sharing this, @bartventer, and nice work! It is greatly appreciated.
LGTM.
Merging.

@gmlewis gmlewis merged commit 2e26546 into google:master Jun 27, 2025
7 checks passed
@bartventer
Copy link
Contributor Author

Thank you for sharing this, @bartventer, and nice work! It is greatly appreciated. LGTM. Merging.

Glad to contribute, thanks for merging @gmlewis !

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.

2 participants
0