支持不缓存条件

This commit is contained in:
刘祥超
2021-06-08 22:45:11 +08:00
parent 549f110e5f
commit 3debe1d1df

View File

@@ -39,6 +39,9 @@ func (this *HTTPRequest) doCacheRead() (shouldStop bool) {
continue continue
} }
if cacheRef.Conds.MatchRequest(this.Format) { if cacheRef.Conds.MatchRequest(this.Format) {
if cacheRef.IsReverse {
return
}
this.cacheRef = cacheRef this.cacheRef = cacheRef
refType = "server" refType = "server"
break break
@@ -53,6 +56,9 @@ func (this *HTTPRequest) doCacheRead() (shouldStop bool) {
continue continue
} }
if cacheRef.Conds.MatchRequest(this.Format) { if cacheRef.Conds.MatchRequest(this.Format) {
if cacheRef.IsReverse {
return
}
this.cacheRef = cacheRef this.cacheRef = cacheRef
refType = "policy" refType = "policy"
break break