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

fix when there's no config

This commit is contained in:
astaxie 2013-04-22 21:31:23 +08:00
parent fad8100804
commit 5f36a3ae4a

1
cache/memory.go vendored
View File

@ -92,6 +92,7 @@ func (bc *MemoryCache) StartAndGC(config string) error {
var cf map[string]int
json.Unmarshal([]byte(config), &cf)
if _, ok := cf["every"]; !ok {
cf = make(map[string]int)
cf["interval"] = DefaultEvery
}
dur, err := time.ParseDuration(fmt.Sprintf("%ds", cf["interval"]))