File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/Middleware/ResponseCaching/src Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,12 @@ public virtual bool AttemptResponseCaching(ResponseCachingContext context)
34
34
public virtual bool AllowCacheLookup ( ResponseCachingContext context )
35
35
{
36
36
var requestHeaders = context . HttpContext . Request . Headers ;
37
+ var cacheControl = requestHeaders [ HeaderNames . CacheControl ] ;
37
38
38
39
// Verify request cache-control parameters
39
- if ( ! StringValues . IsNullOrEmpty ( requestHeaders [ HeaderNames . CacheControl ] ) )
40
+ if ( ! StringValues . IsNullOrEmpty ( cacheControl ) )
40
41
{
41
- if ( HeaderUtilities . ContainsCacheDirective ( requestHeaders [ HeaderNames . CacheControl ] , CacheControlHeaderValue . NoCacheString ) )
42
+ if ( HeaderUtilities . ContainsCacheDirective ( cacheControl , CacheControlHeaderValue . NoCacheString ) )
42
43
{
43
44
context . Logger . RequestWithNoCacheNotCacheable ( ) ;
44
45
return false ;
You can’t perform that action at this time.
0 commit comments