修改test文件

This commit is contained in:
yun
2024-04-12 16:33:00 +08:00
parent 6473f6c61d
commit a54973797d
+5 -3
View File
@@ -9,12 +9,14 @@ import (
) )
func TestCache(t *testing.T) { func TestCache(t *testing.T) {
cachex.NewCache("").Set("test", "test", time.Second*5) c := cachex.NewCache("")
da, err := cachex.NewCache("").Get("test") c.Set("test", "test", time.Second*5)
da, err := c.Get("test")
fmt.Println(da, err) fmt.Println(da, err)
time.Sleep(time.Second * 5) time.Sleep(time.Second * 5)
da, err = cachex.NewCache("").Get("test") da, err = c.Get("test")
fmt.Println(da, err) fmt.Println(da, err)
} }