You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found an issue when playing with the new TTL feature.
It's not possible to reuse a key to update the cache with a new value.
The sample use case :
c, err := NewCache(...)
// Add a value with key 1 in the cache
c.SetWithTTL(1, 1, 1, 5*time.Second)
_, ok := c.Get(1) // return true
// some time later
// Add another value with key 1 in the cache
c.SetWithTTL(1, 1, 1, 5*time.Second)
_, ok := c.Get(1) // return false
I submit the following PR to correct this issue : #130
The text was updated successfully, but these errors were encountered:
Hello,
I've found an issue when playing with the new TTL feature.
It's not possible to reuse a key to update the cache with a new value.
The sample use case :
I submit the following PR to correct this issue : #130
The text was updated successfully, but these errors were encountered: