5f36a3ae by astaxie

fix when there's no config

1 parent fad81008
......@@ -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"]))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!