mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-02-07 21:45:39 +08:00
边缘节点支持设置多个缓存目录
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
package serverconfigs
|
||||
|
||||
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
|
||||
|
||||
type CacheDir struct {
|
||||
Path string `yaml:"path" json:"path"` // 目录
|
||||
Capacity *shared.SizeCapacity `yaml:"capacity" json:"capacity"` // 容量限制 TODO 暂时不实现
|
||||
}
|
||||
|
||||
// HTTPFileCacheStorage 文件缓存存储策略
|
||||
type HTTPFileCacheStorage struct {
|
||||
Dir string `yaml:"dir" json:"dir"` // 目录
|
||||
SubDirs []*CacheDir `yaml:"cacheDir" json:"subDirs"` // 子目录
|
||||
MemoryPolicy *HTTPCachePolicy `yaml:"memoryPolicy" json:"memoryPolicy"` // 内存二级缓存
|
||||
|
||||
OpenFileCache *OpenFileCacheConfig `yaml:"openFileCache" json:"openFileCache"` // open file cache配置
|
||||
|
||||
Reference in New Issue
Block a user