缓存策略增加“允许读取不完整的Partial Content”选项

This commit is contained in:
GoEdgeLab
2024-05-07 20:04:53 +08:00
parent 75337ebafd
commit 54d6d4a13f

View File

@@ -17,12 +17,14 @@ type HTTPFileCacheStorage struct {
OpenFileCache *OpenFileCacheConfig `yaml:"openFileCache" json:"openFileCache"` // open file cache配置
EnableSendfile bool `yaml:"enableSendFile" json:"enableSendfile"` // 是否启用Sendfile
EnableMMAP bool `yaml:"enableMMAP" json:"enableMMAP"` // 是否启用MMAP
EnableMMAP bool `yaml:"enableMMAP" json:"enableMMAP"` // 是否启用MMAP
EnableIncompletePartialContent bool `yaml:"enableIncompletePartialContent" json:"enableIncompletePartialContent"` // 允许读取未下载完整的Partial Content
}
func NewHTTPFileCacheStorage() *HTTPFileCacheStorage {
return &HTTPFileCacheStorage{
EnableMMAP: false,
EnableMMAP: false,
EnableIncompletePartialContent: true,
}
}