实现缓存策略部分管理功能

This commit is contained in:
GoEdgeLab
2020-10-02 17:22:46 +08:00
parent ba705b878f
commit da9ef1e5e7
15 changed files with 2474 additions and 421 deletions

View File

@@ -1,11 +1,18 @@
package serverconfigs
type HTTPCacheRef struct {
IsPrior bool `yaml:"isPrior" json:"isPrior"` // 是否覆盖
IsOn bool `yaml:"isOn" json:"isOn"` // 是否开启
CachePolicyId int64 `yaml:"cachePolicyId" json:"cachePolicyId"` // 缓存策略ID
IsPrior bool `yaml:"isPrior" json:"isPrior"` // 是否覆盖
IsOn bool `yaml:"isOn" json:"isOn"` // 是否开启
CachePolicyId int64 `yaml:"cachePolicyId" json:"cachePolicyId"` // 缓存策略ID
Cond *HTTPCacheCond `yaml:"cond" json:"cond"` // 条件
}
func (this *HTTPCacheRef) Init() error {
if this.Cond != nil {
err := this.Cond.Init()
if err != nil {
return err
}
}
return nil
}