This repository has been archived by the owner on Nov 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Conversation
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
JunTaoLuo
changed the title
Restructure middleware flow (Very WIP)
Restructure middleware flow
Dec 15, 2016
Please take a look while @Tratcher is out. |
HeaderUtilities.TryParseSeconds(requestCacheControlHeaders, CacheControlHeaderValue.MaxStaleString, out requestMaxStale); | ||
|
||
// Request allows stale values | ||
// Request allows stale values no age limit |
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.
with no age limit
cc @muratg |
ping @Tratcher |
Tratcher
reviewed
Jan 6, 2017
@@ -74,14 +74,16 @@ public class ResponseCachingMiddleware | |||
var context = new ResponseCachingContext(httpContext, _logger); | |||
|
|||
// Should we attempt any caching logic? | |||
if (_policyProvider.IsRequestCacheable(context)) | |||
if (_policyProvider.AllowResponseCaching(context)) |
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.
Need to find a name that disambiguate AllowResponseCaching from AllowCacheStorage.
The method implementation checks if caching logic is even applicable to this kind of request.
{ | ||
return; | ||
} | ||
|
||
context.AllowResponseCapture = _policyProvider.AllowCacheStorage(context); |
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.
Restructure flow to skip more logic for false.
JunTaoLuo
force-pushed
the
johluo/restructure
branch
from
January 9, 2017 19:07
b979709
to
48cbfa4
Compare
Tratcher
approved these changes
Jan 10, 2017
JunTaoLuo
force-pushed
the
johluo/restructure
branch
2 times, most recently
from
January 10, 2017 22:44
a009613
to
6db4df4
Compare
- Always add IresponseCachingFeatu8re before calling the next middleware #81 - Use If-Modified-Since instead of the incorrect If-Unmodified-Since header #83 - Handle proxy-revalidate in the same way as must-revalidate #83 - Handle max-stale with no specified limit #83 - Bypass cache lookup for no-cache but store the response #83 - Bypass response capturing and buffering when no-store is specified #83 - Replace IsRequestCacheable cache policy with three new independent policy checks to reflect these changes - Modify middleware flow to accommodate cache policy updates
JunTaoLuo
force-pushed
the
johluo/restructure
branch
from
January 10, 2017 22:49
6db4df4
to
3bf5f6a
Compare
This was referenced Jan 10, 2017
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.
This addresses #83 and #81
TODO: