mirror of
https://github.com/astaxie/beego.git
synced 2024-11-29 11:11:33 +00:00
commit
b606f1f73f
4
cache/memory.go
vendored
4
cache/memory.go
vendored
@ -203,12 +203,12 @@ func (bc *MemoryCache) StartAndGC(config string) error {
|
|||||||
dur := time.Duration(cf["interval"]) * time.Second
|
dur := time.Duration(cf["interval"]) * time.Second
|
||||||
bc.Every = cf["interval"]
|
bc.Every = cf["interval"]
|
||||||
bc.dur = dur
|
bc.dur = dur
|
||||||
go bc.vaccuum()
|
go bc.vacuum()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// check expiration.
|
// check expiration.
|
||||||
func (bc *MemoryCache) vaccuum() {
|
func (bc *MemoryCache) vacuum() {
|
||||||
if bc.Every < 1 {
|
if bc.Every < 1 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user