优化内存缓存限制

This commit is contained in:
刘祥超
2023-10-01 14:11:48 +08:00
parent 9113c4c1b3
commit d9fddcb001
3 changed files with 56 additions and 28 deletions

View File

@@ -4,6 +4,7 @@ package fsutils
import (
teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
"github.com/iwind/TeaGo/Tea"
"sync/atomic"
"time"
)
@@ -67,6 +68,10 @@ func DiskIsFast() bool {
}
func DiskIsExtremelyFast() bool {
// 在开发环境下返回false以便于测试
if Tea.IsTesting() {
return false
}
return DiskSpeed == SpeedExtremelyFast
}