[6.x] [optimizer] allow http caching for bundles (#15880)#15933
Merged
epixa merged 1 commit intoelastic:6.xfrom Jan 9, 2018
Merged
[6.x] [optimizer] allow http caching for bundles (#15880)#15933epixa merged 1 commit intoelastic:6.xfrom
epixa merged 1 commit intoelastic:6.xfrom
Conversation
By setting cache-control to must-revalidate, we indicate to the browser that it should send the if-none-match header with the last known etag value. If the etags match, the server responds with a 304 and no body, and if they don't the server responds with a 200 and a body along with a new etag. This ensures a cache is always invalidated when a bundle changes, like when Kibana is upgraded or a plugin is installed. We no longer send the last-modified header because we don't want the browser caching based on time. Doing so can be unpredictable since the browser may not agree with the server's definitions of DST, and the server time itself can be changed.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backports the following commits to 6.x: