Skip to content
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

CacheFilter: Correctly calculate cached response age #9859

Closed
toddmgreer opened this issue Jan 28, 2020 · 1 comment · Fixed by #12802
Closed

CacheFilter: Correctly calculate cached response age #9859

toddmgreer opened this issue Jan 28, 2020 · 1 comment · Fixed by #12802
Labels

Comments

@toddmgreer
Copy link
Contributor

CacheFilter doesn't fully implement the algorithms specified in RFC7234§4.2 to calculate freshness lifetime and age, based on the date, age, and expires response headers, the max-age and s-maxage response cache directives, and the max-age request cache directives. The RFC-specified freshness and age algorithms must be fully implemented. This must be fixed before CacheFilter can be appropriate for production deployment.

@yosrym93
Copy link
Contributor

In #11727 , LookupRequest::requiresValidation calculates some freshness and age info that might be useful when working on this.

htuch pushed a commit that referenced this issue Sep 11, 2020
The time at which responses are received is recorded, and stored with cached responses as response_time. When a response is served from cache, response_time and other headers are used to correctly calculate the age of the cached response.

Risk Level: Low
Testing: Unit tests.
Docs Changes: N/A
Release Notes: N/A

Fixes #9859
Fixes #12140

Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants