修复ttlcache的一个bug

This commit is contained in:
GoEdgeLab
2021-04-18 21:50:26 +08:00
parent 2a7b38f305
commit f420054bb7

View File

@@ -30,7 +30,7 @@ func (this *Piece) IncreaseInt64(key uint64, delta int64, expiredAt int64) (resu
this.locker.Lock() this.locker.Lock()
item, ok := this.m[key] item, ok := this.m[key]
if ok { if ok {
result := types.Int64(item.Value) + delta result = types.Int64(item.Value) + delta
item.Value = result item.Value = result
item.expiredAt = expiredAt item.expiredAt = expiredAt
} else { } else {