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 want to use this cache in a concurrent system, should I declare a Mutex for managing simultaneously read/write operations, or can I use it safely without it?
The text was updated successfully, but these errors were encountered:
Same concern, while reading the code I saw it is not thread-safe. But need the confirmation from the dev team. At the moment I init the cache instance per request.
It looks to me as though the cache is safe to run in a concurrent system. Instead of relying directly on channels or mutex, it seems to use singleflight.Group. The Once() function in particular is a clever way of handling duplicate requests of the same key in parallel--I'm looking forward to trying this library since it's already got code I thought I'd have to write . . .
I want to use this cache in a concurrent system, should I declare a Mutex for managing simultaneously read/write operations, or can I use it safely without it?
The text was updated successfully, but these errors were encountered: