mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-01-04 18:16:35 +08:00
实现服务的缓存策略设置
This commit is contained in:
18
pkg/serverconfigs/http_cache_config.go
Normal file
18
pkg/serverconfigs/http_cache_config.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package serverconfigs
|
||||
|
||||
type HTTPCacheConfig struct {
|
||||
IsPrior bool `yaml:"isPrior" json:"isPrior"`
|
||||
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||
|
||||
CacheRefs []*HTTPCacheRef `yaml:"cacheRefs" json:"cacheRefs"` // 缓存配置
|
||||
}
|
||||
|
||||
func (this *HTTPCacheConfig) Init() error {
|
||||
for _, cacheRef := range this.CacheRefs {
|
||||
err := cacheRef.Init()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user