From a46ba472bb8ea4f817226d255bc467cda4dc22ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sat, 13 Nov 2021 21:02:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98=E7=AD=96=E7=95=A5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=8B=A5=E5=B9=B2=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/serverconfigs/http_cache_policy.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/serverconfigs/http_cache_policy.go b/pkg/serverconfigs/http_cache_policy.go index 14eae23..177c731 100644 --- a/pkg/serverconfigs/http_cache_policy.go +++ b/pkg/serverconfigs/http_cache_policy.go @@ -23,6 +23,15 @@ type HTTPCachePolicy struct { CacheRefs []*HTTPCacheRef `yaml:"cacheRefs" json:"cacheRefs"` // 缓存配置 + PersistenceAutoPurgeCount int `yaml:"persistenceAutoPurgeCount" json:"persistenceAutoPurgeCount"` // 每次自动清理的条数 TODO 需要实现 + PersistenceAutoPurgeInterval int `yaml:"persistenceAutoPurgeInterval" json:"persistenceAutoPurgeInterval"` // 自动清理的时间间隔(秒) TODO 需要实现 + PersistenceLFUFreePercent float32 `yaml:"persistenceLFUFreePercent" json:"persistenceLFUFreePercent"` // LFU算法执行阈值,剩余空间比例,使用百分比,比如20 TODO 需要实现 + + MemoryAutoPurgeCount int `yaml:"memoryAutoPurgeCount" json:"memoryAutoPurgeCount"` // 每次自动清理的条数 TODO 需要实现 + MemoryAutoPurgeInterval int `yaml:"memoryAutoPurgeInterval" json:"memoryAutoPurgeInterval"` // 自动清理的时间间隔(秒) TODO 需要实现 + MemoryLFUFreePercent float32 `yaml:"memoryLFUFreePercent" json:"memoryLFUFreePercent"` // LFU算法执行阈值,剩余空间比例,使用百分比,比如20 TODO 需要实现 + MemoryAutoFlushQueueSize int `yaml:"memoryAutoFlushQueueSize" json:"memoryAutoFlushQueueSize"` // 自动刷新到持久层队列尺寸 TODO 需要实现 + capacity int64 maxSize int64 }