This repository was archived by the owner on Jun 21, 2022. It is now read-only.
bug 730714: Implement response caching#2
Merged
lmorchard merged 1 commit intomdn:masterfrom Mar 16, 2012
Merged
Conversation
lib/kumascript/caching.js
Outdated
Contributor
There was a problem hiding this comment.
should all these var's go up higher? I know variable hoisting will take care of it, but I was confused by the cache_key reference in 64 before I noticed this.
Contributor
Author
There was a problem hiding this comment.
Doh, no those should go higher, good catch!
Contributor
Author
There was a problem hiding this comment.
Though, oddly enough, the behavior here ends up being correct: Since cache_key is null at the time revalidate() gets called, the response from unsupported request methods doesn't get cached.
But, that's just an accident, and this needs to be coded better. I'll probably commit some tweaks to fix
Contributor
|
r+ after the nits - code looks good and makes sense, tests pass, works locally. |
* In server.js, cache responses to the GET request handler * In caching.js, ResponseCache wraps around a response handler, which caches the results and honors HTTP conditional GET and cache control semantics
lmorchard
added a commit
that referenced
this pull request
Mar 16, 2012
bug 730714: Implement response caching
escattone
pushed a commit
that referenced
this pull request
Jun 23, 2017
use done for test changed from sync to async
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
caches the results and honors HTTP conditional GET and cache control
semantics