优化代码

This commit is contained in:
GoEdgeLab
2024-03-22 08:23:22 +08:00
parent 725fe63c8a
commit aef4abdbdd
10 changed files with 75 additions and 46 deletions

View File

@@ -61,7 +61,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() + 1,
ExpiresAt: time.Now().Unix() + 1,
HeaderSize: 1,
MetaSize: 2,
BodySize: 3,
@@ -100,7 +100,7 @@ func TestFileList_Add_Many(t *testing.T) {
u := "https://edge.teaos.cn/123456" + strconv.Itoa(i)
_ = list.Add(stringutil.Md5(u), &caches.Item{
Key: u,
ExpiredAt: time.Now().Unix() + 3600,
ExpiresAt: time.Now().Unix() + 3600,
HeaderSize: 1,
MetaSize: 2,
BodySize: 3,