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
In a highly concurrent traffic scenario, when an item is expired, many requests fail to get the value and hence, they flood the other data source (a db in my case). I am currently using https://github.com/patrickmn/go-cache and it has GetWithExpiration method so that before a minute when expiration occurs, a goroutine singlehandedly re-populates the cache (with the help of TryLock).
I might work on this if this sounds valuable.
The text was updated successfully, but these errors were encountered:
I think I have a use case for this.
In a highly concurrent traffic scenario, when an item is expired, many requests fail to get the value and hence, they flood the other data source (a db in my case). I am currently using https://github.com/patrickmn/go-cache and it has GetWithExpiration method so that before a minute when expiration occurs, a goroutine singlehandedly re-populates the cache (with the help of TryLock).
I might work on this if this sounds valuable.
The text was updated successfully, but these errors were encountered: