Hello. I am using your library and I have a problem with concurrency. Two parallel requests to empty cache not found data and fetching it from database twice. I think RWMutex will solve this problem, but maybe I need to use map of RWMutexes by cache keys for example:
Hello. I am using your library and I have a problem with concurrency. Two parallel requests to empty cache not found data and fetching it from database twice. I think RWMutex will solve this problem, but maybe I need to use map of RWMutexes by cache keys for example:
Do you have ideas how to solve this problem ?
Steps for Reproduction
Expected behavior: All parallel requests executing one by one (using sync.Map or RWMutex)
Actual behavior: All parallel requests executing parallel
Platforms: go 1.19 (win and linux)
Versions: v4.1.5