mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:40:55 +00:00
no more goroutine ,i will be GCed at a gc goroutine
This commit is contained in:
parent
98e0626f0c
commit
6465dbd703
1
cache/memory.go
vendored
1
cache/memory.go
vendored
@ -64,7 +64,6 @@ func (bc *MemoryCache) Get(name string) interface{} {
|
|||||||
defer bc.RUnlock()
|
defer bc.RUnlock()
|
||||||
if itm, ok := bc.items[name]; ok {
|
if itm, ok := bc.items[name]; ok {
|
||||||
if itm.isExpire() {
|
if itm.isExpire() {
|
||||||
go bc.Delete(name)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return itm.val
|
return itm.val
|
||||||
|
Loading…
Reference in New Issue
Block a user