缓存文件实现Sendfile

This commit is contained in:
GoEdgeLab
2022-04-04 19:46:12 +08:00
parent 1373517c57
commit 64e619e6e3
8 changed files with 79 additions and 13 deletions

View File

@@ -32,6 +32,7 @@ func (this *CreatePopupAction) RunPost(params struct {
FileDir string
FileMemoryCapacityJSON []byte
FileOpenFileCacheMax int
FileEnableSendfile bool
CapacityJSON []byte
MaxSizeJSON []byte
@@ -77,7 +78,8 @@ func (this *CreatePopupAction) RunPost(params struct {
MemoryPolicy: &serverconfigs.HTTPCachePolicy{
Capacity: memoryCapacity,
},
OpenFileCache: openFileCacheConfig,
OpenFileCache: openFileCacheConfig,
EnableSendfile: params.FileEnableSendfile,
}
case serverconfigs.CachePolicyStorageMemory:
options = &serverconfigs.HTTPMemoryCacheStorage{}