mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 20:40:26 +08:00
修复ttlcache的一个bug
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user