1b715bcb by astaxie

fix cache bug

1 parent 4ef5883f
Showing 1 changed file with 1 additions and 1 deletions
...@@ -51,7 +51,7 @@ func (bc *BeeCache) Put(name string, value interface{}, expired int) error { ...@@ -51,7 +51,7 @@ func (bc *BeeCache) Put(name string, value interface{}, expired int) error {
51 bc.lock.Lock() 51 bc.lock.Lock()
52 defer bc.lock.Unlock() 52 defer bc.lock.Unlock()
53 t := BeeItem{val: value, Lastaccess: time.Now(), expired: expired} 53 t := BeeItem{val: value, Lastaccess: time.Now(), expired: expired}
54 if _, ok := bc.items[name]; !ok { 54 if _, ok := bc.items[name]; ok {
55 return errors.New("the key is exist") 55 return errors.New("the key is exist")
56 } else { 56 } else {
57 bc.items[name] = &t 57 bc.items[name] = &t
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!