通过内存缓存提升文件缓存效率大约20%

This commit is contained in:
GoEdgeLab
2021-08-21 21:06:48 +08:00
parent 53f3a56972
commit 7a452c5a6f
6 changed files with 56 additions and 8 deletions

View File

@@ -50,7 +50,7 @@ func TestFileList_Add_Many(t *testing.T) {
}
before := time.Now()
for i := 0; i < 2000_0000; i++ {
u := "http://edge.teaos.cn/123456" + strconv.Itoa(i)
u := "https://edge.teaos.cn/123456" + strconv.Itoa(i)
_ = list.Add(stringutil.Md5(u), &Item{
Key: u,
ExpiredAt: time.Now().Unix() + 3600,