-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Cache middleware: Store e2e headers. (#1807)
* ✨ Cache middleware: Store e2e headers. As defined in RFC2616 - section-13.5.1, shared caches MUST store end-to-end headers from backend response and MUST be transmitted in any response formed from a cache entry. This commit ensures a stronger consistency between responses served from the handlers & from the cache middleware. * ✨ Cache middleware: Add flag for e2e headers. Set flag to prevent e2e headers caching to be the default behavior of the cache middleware. This would otherwise change quite a lot the experience for cache middleware current users. * ✨ Cache middleware: Add Benchmark for additionalHeaders feature. * ✨ Cache middleware: Rename E2Eheaders into StoreResponseHeaders. E2E is an acronym commonly associated with test. While in the present case it refers to end-to-end HTTP headers (by opposition to hop-by-hop), this still remains confusing. This commits renames it to a more generic name. * ✨ Cache middleware: Update README * ✨ Cache middleware: Move map instanciation. This will prevent an extra memory allocation for users not interested in this feature. * ✨ Cache middleware: Prevent memory allocation when StoreResponseHeaders is disabled. * ✨ Cache middleware: Store e2e headers. #1807 - use set instead of add for the headers - copy value from the headers -> prevent problems with mutable values Co-authored-by: wernerr <[email protected]>
- Loading branch information
1 parent
0120531
commit 1cddc56
Showing
6 changed files
with
200 additions
and
7 deletions.
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.