修改test文件
This commit is contained in:
+5
-3
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user