1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-11 04:40:39 +00:00

Revert "should use time.Since instead of time.Now().Sub"

This commit is contained in:
astaxie
2017-09-09 06:29:38 +08:00
committed by GitHub
parent 07a9a2d0f3
commit a7354d2d08
6 changed files with 7 additions and 7 deletions

2
cache/memory.go vendored
View File

@ -38,7 +38,7 @@ func (mi *MemoryItem) isExpire() bool {
if mi.lifespan == 0 {
return false
}
return time.Since(mi.createdTime) > mi.lifespan
return time.Now().Sub(mi.createdTime) > mi.lifespan
}
// MemoryCache is Memory cache adapter.