From 36d8c3f3663b33218976d7ce2b3407ca9e5c862c Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 24 Feb 2022 20:39:43 +0800 Subject: [PATCH] Update http_request_cache.go --- internal/nodes/http_request_cache.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/nodes/http_request_cache.go b/internal/nodes/http_request_cache.go index 6543608..d1d8dff 100644 --- a/internal/nodes/http_request_cache.go +++ b/internal/nodes/http_request_cache.go @@ -63,7 +63,7 @@ func (this *HTTPRequest) doCacheRead(useStale bool) (shouldStop bool) { break } } - if this.cacheRef == nil { + if this.cacheRef == nil && !this.web.Cache.DisablePolicyRefs { // 检查策略默认的缓存条件 for _, cacheRef := range cachePolicy.CacheRefs { if !cacheRef.IsOn || @@ -80,10 +80,10 @@ func (this *HTTPRequest) doCacheRead(useStale bool) (shouldStop bool) { break } } + } - if this.cacheRef == nil { - return - } + if this.cacheRef == nil { + return } // 校验请求