修复节点设置的“缓存磁盘容量”不起作用的问题

This commit is contained in:
GoEdgeLab
2022-11-07 21:32:20 +08:00
parent ad1f51bf1f
commit 685d1dd491
2 changed files with 2 additions and 1 deletions

1
go.mod
View File

@@ -5,6 +5,7 @@ go 1.18
replace ( replace (
github.com/TeaOSLab/EdgeCommon => ../EdgeCommon github.com/TeaOSLab/EdgeCommon => ../EdgeCommon
github.com/fsnotify/fsnotify => github.com/iwind/fsnotify v1.5.2-0.20220817040843-193be2051ff4 github.com/fsnotify/fsnotify => github.com/iwind/fsnotify v1.5.2-0.20220817040843-193be2051ff4
rogchap.com/v8go => /Users/Workspace/Projects/v8go
) )
require ( require (

View File

@@ -954,7 +954,7 @@ func (this *FileStorage) purgeLoop() {
this.checkDiskSpace() this.checkDiskSpace()
// 计算是否应该开启LFU清理 // 计算是否应该开启LFU清理
var capacityBytes = this.policy.CapacityBytes() var capacityBytes = this.diskCapacityBytes()
var startLFU = false var startLFU = false
var lfuFreePercent = this.policy.PersistenceLFUFreePercent var lfuFreePercent = this.policy.PersistenceLFUFreePercent
if lfuFreePercent <= 0 { if lfuFreePercent <= 0 {