使用MMAP提升缓存读取性能

This commit is contained in:
GoEdgeLab
2024-03-29 19:30:12 +08:00
parent dc5d828bc3
commit 9e9ec24bd2
5 changed files with 42 additions and 6 deletions

View File

@@ -41,6 +41,7 @@ func (this *CreatePopupAction) RunPost(params struct {
MaxSizeJSON []byte
FetchTimeoutJSON []byte
SyncCompressionCache bool
EnableMMAP bool
Description string
IsOn bool
@@ -97,6 +98,7 @@ func (this *CreatePopupAction) RunPost(params struct {
OpenFileCache: openFileCacheConfig,
EnableSendfile: params.FileEnableSendfile,
MinFreeSize: minFreeSize,
EnableMMAP: params.EnableMMAP,
}
case serverconfigs.CachePolicyStorageMemory:
options = &serverconfigs.HTTPMemoryCacheStorage{}