1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-21 21:40:55 +00:00

Improved definition of DefaultEvery

This commit is contained in:
IamCathal 2020-08-05 17:56:11 +01:00
parent 2f5683610f
commit e7d8bab5d9

4
pkg/cache/memory.go vendored
View File

@ -22,7 +22,7 @@ import (
)
var (
// Recycle the expired cache items in memory (in seconds)
// Timer for how often to recycle the expired cache items in memory (in seconds)
DefaultEvery = 60 // 1 minute
)
@ -81,7 +81,7 @@ func (bc *MemoryCache) GetMulti(names []string) []interface{} {
}
// Put puts cache into memory.
// If lifespan is 0, it will never overwrite this value
// If lifespan is 0, it will never overwrite this value unless restarted
func (bc *MemoryCache) Put(name string, value interface{}, lifespan time.Duration) error {
bc.Lock()
defer bc.Unlock()