cache
cache copied to clipboard
Is it safe to use it with concurrency?
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?
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 . . .
Has anyone found out whether this is concurrency safe yet?
Same situation. I would love to here a reply from the dev team.