使用MMAP提升缓存读取性能

This commit is contained in:
GoEdgeLab
2024-03-29 18:32:31 +08:00
parent 8360d29e1b
commit 739dfc7d1c

View File

@@ -174,7 +174,8 @@ func (this *HTTPCachePolicyDAO) CreateDefaultCachePolicy(tx *dbs.Tx, name string
} }
var storageOptions = &serverconfigs.HTTPFileCacheStorage{ var storageOptions = &serverconfigs.HTTPFileCacheStorage{
Dir: "/opt/cache", Dir: "/opt/cache",
EnableMMAP: true,
MemoryPolicy: &serverconfigs.HTTPCachePolicy{ MemoryPolicy: &serverconfigs.HTTPCachePolicy{
Capacity: &shared.SizeCapacity{ Capacity: &shared.SizeCapacity{
Count: 1, Count: 1,