mirror of
https://github.com/astaxie/beego.git
synced 2024-11-21 16:40:55 +00:00
Improved definition of DefaultEvery
This commit is contained in:
parent
2f5683610f
commit
e7d8bab5d9
4
pkg/cache/memory.go
vendored
4
pkg/cache/memory.go
vendored
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user