ETAG Support, Variable Cache Time - #12
Open
sawilde wants to merge 5 commits into
Open
Conversation
…downloading expired cached data if we already have the latest version
Owner
|
Thanks for doing this, this looks pretty good. Could you write some unit tests for the etag stuff? |
Author
|
I may need your help - I tried following your tests but got confused (it was late though) Can you give me some direction. |
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.
ETAG Support
By using ETags we can query the server and only download data if we do not already have the latest version i.e. if we get a 304 (NotModified) then we update the cache entry with a new expired time otherwise we resort to the "normal" path.
Customised Cache Time Management
Allows a variable expiry cache time i.e. to be calculated based on "other" factors rather than just be a static time.