Files
EdgeCommon/pkg/serverconfigs/http_cache_storage_file.go

20 lines
563 B
Go
Raw Normal View History

2020-10-04 20:38:03 +08:00
package serverconfigs
2022-01-12 21:09:23 +08:00
// HTTPFileCacheStorage 文件缓存存储策略
2020-10-04 20:38:03 +08:00
type HTTPFileCacheStorage struct {
2021-03-16 18:09:29 +08:00
Dir string `yaml:"dir" json:"dir"` // 目录
MemoryPolicy *HTTPCachePolicy `yaml:"memoryPolicy" json:"memoryPolicy"` // 内存二级缓存
2022-01-12 21:09:23 +08:00
OpenFileCache *OpenFileCacheConfig `yaml:"openFileCache" json:"openFileCache"` // open file cache配置
2020-10-04 20:38:03 +08:00
}
func (this *HTTPFileCacheStorage) Init() error {
2022-01-12 21:09:23 +08:00
if this.OpenFileCache != nil {
err := this.OpenFileCache.Init()
if err != nil {
return err
}
}
2020-10-04 20:38:03 +08:00
return nil
}