-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
caching: Validate stale cache entries and update cached headers #12232
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
5e93c44
Requests with conditional headers bypass the CacheFilter
yosrym93 73bba3a
Implemented injecting conditional headers in the request to validate …
yosrym93 659b0e7
Responses to cache validation requests are now checked and handled co…
yosrym93 0f062bc
Added integration tests for cache entry validation, fixed a few bugs …
yosrym93 a224c6e
Updating cached responses is now RFC-compliant, also added ASSERTS fo…
yosrym93 7adb280
Merge remote-tracking branch 'upstream/master' into validation
yosrym93 d228ada
Improved code readability and style
yosrym93 706e43b
Changed conditionalHeaders from a vector of const pointers to a vecto…
yosrym93 08d0622
Added fall through marker comment for GCC
yosrym93 ffb5d96
Improved readability and style
yosrym93 ea36c44
If-Modified-Since validation header falls back to Date if Last-Modifi…
yosrym93 c46bdb5
Strayed trace statements
yosrym93 bdd8e4f
Code readability improvements
yosrym93 f46b108
Redesigned state management in the CacheFilter -- now it is simpler a…
yosrym93 5316ead
Merge remote-tracking branch 'upstream/master' into validation
yosrym93 dcd2ada
Code clean up
yosrym93 6c8edce
Merge remote-tracking branch 'upstream/master' into validation
yosrym93 a592448
Nit: moved an include from a header file to a cc file
yosrym93 6f90f8e
Merge remote-tracking branch 'upstream/master' into validation
yosrym93 634f21e
Merge remote-tracking branch 'upstream/master' into validation
yosrym93 99f3aef
Merge remote-tracking branch 'upstream/master' into validation
yosrym93 ec27fb0
Fixed a minor logical error
yosrym93 a1330a4
cherry-pick from (#12481): tidy: use libstdc++
lizan daaf757
Merge remote-tracking branch 'upstream/master' into validation
yosrym93 eb7bc75
Revised the punctuation of the whole cache tree
yosrym93 fd2d65b
Merge remote-tracking branch 'upstream/master' into validation
yosrym93 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we register them as static inline headers instead of using
get
through out the implementation?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could add a
inline_headers_handles.h
file to the cache tree that registers all the used headers in this module (usingHttp::RegisterCustomInlineHeader
), to avoid registering them in every file that uses them. What do you think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I guess this won't work without making the handles static which is against the style guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also no
setReferenceKeyInline
to replacesetReferenceKey(Http::CustomHeaders::get().IfModifiedSince, date)
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, can you do it as a follow up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate further on what you are suggesting as a follow up?