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 don't think sync.Map would be a good default choice.
Caches are gerenally read more freaquently that written to.
I would suggest sending your cache updates to a channel and recieving from it on a different goroutine in a loop (select with timeout) and updating the cache.
It's caused by the RWLock for the thread-safe. How about using sync.Map? It can increase the efficiency of
Get
.The text was updated successfully, but these errors were encountered: