mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-19 12:20:25 +08:00
Update http_request_cache.go
This commit is contained in:
@@ -63,7 +63,7 @@ func (this *HTTPRequest) doCacheRead(useStale bool) (shouldStop bool) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if this.cacheRef == nil {
|
if this.cacheRef == nil && !this.web.Cache.DisablePolicyRefs {
|
||||||
// 检查策略默认的缓存条件
|
// 检查策略默认的缓存条件
|
||||||
for _, cacheRef := range cachePolicy.CacheRefs {
|
for _, cacheRef := range cachePolicy.CacheRefs {
|
||||||
if !cacheRef.IsOn ||
|
if !cacheRef.IsOn ||
|
||||||
@@ -80,11 +80,11 @@ func (this *HTTPRequest) doCacheRead(useStale bool) (shouldStop bool) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if this.cacheRef == nil {
|
if this.cacheRef == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 校验请求
|
// 校验请求
|
||||||
if !this.cacheRef.MatchRequest(this.RawReq) {
|
if !this.cacheRef.MatchRequest(this.RawReq) {
|
||||||
|
|||||||
Reference in New Issue
Block a user