调整缓存索引数据库缓存尺寸

This commit is contained in:
GoEdgeLab
2023-11-06 22:10:34 +08:00
parent 52c3908803
commit ea0f4135ea
2 changed files with 2 additions and 2 deletions

View File

@@ -68,7 +68,7 @@ func (this *FileListDB) Open(dbPath string) error {
var cacheSize = 512
var memoryGB = utils.SystemMemoryGB()
if memoryGB >= 1 {
cacheSize = 128 * memoryGB
cacheSize = 256 * memoryGB
}
// write db

View File

@@ -116,7 +116,7 @@ func TestFileListDB_Memory(t *testing.T) {
_ = db.Close()
}()
err := db.Open(Tea.Root + "/data/db-0.db")
err := db.Open(Tea.Root + "/data/cache-index/p1/db-0.db")
if err != nil {
t.Fatal(err)
}