提升缓存效率

This commit is contained in:
GoEdgeLab
2022-03-16 16:20:53 +08:00
parent 832fb355fa
commit a90baa69c7
6 changed files with 155 additions and 61 deletions

View File

@@ -42,7 +42,7 @@ func TestFileList_Add(t *testing.T) {
t.Log("db index:", list.GetDBIndex(hash))
err = list.Add(hash, &caches.Item{
Key: "123456",
ExpiredAt: time.Now().Unix(),
ExpiredAt: time.Now().Unix() + 1,
HeaderSize: 1,
MetaSize: 2,
BodySize: 3,
@@ -53,6 +53,8 @@ func TestFileList_Add(t *testing.T) {
t.Fatal(err)
}
t.Log(list.Exist(hash))
t.Log("ok")
}