mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-30 01:37:04 +08:00
缓存支持请求方法设置
This commit is contained in:
@@ -81,6 +81,12 @@ func (this *HTTPRequest) doCacheRead() (shouldStop bool) {
|
||||
}
|
||||
}
|
||||
|
||||
// 校验请求
|
||||
if !this.cacheRef.MatchRequest(this.RawReq) {
|
||||
this.cacheRef = nil
|
||||
return
|
||||
}
|
||||
|
||||
// 相关变量
|
||||
this.varMapping["cache.policy.name"] = cachePolicy.Name
|
||||
this.varMapping["cache.policy.id"] = strconv.FormatInt(cachePolicy.Id, 10)
|
||||
|
||||
Reference in New Issue
Block a user