fix cache's bug expird is not changed by get method

This commit is contained in:
astaxie
2013-07-04 13:02:11 +08:00
parent 9b392a0601
commit 174298b497
5 changed files with 23 additions and 25 deletions

4
cache/cache_test.go vendored
View File

@@ -6,7 +6,7 @@ import (
)
func Test_cache(t *testing.T) {
bm, err := NewCache("memory", `{"interval":60}`)
bm, err := NewCache("memory", `{"interval":20}`)
if err != nil {
t.Error("init err")
}
@@ -21,7 +21,7 @@ func Test_cache(t *testing.T) {
t.Error("get err")
}
time.Sleep(70 * time.Second)
time.Sleep(30 * time.Second)
if bm.IsExist("astaxie") {
t.Error("check err")