mirror of
https://github.com/syncthing/syncthing.git
synced 2026-10-07 19:51:41 -04:00
Successful LRU cache lookups modify the cache's recency list, so RWMutex.RLock isn't enough protection. Secondarily, multiple concurrent lookups with the same key should not create separate rate limiters, so release the lock only when presence of the key in the cache has been ascertained. Co-authored-by: greatroar <@>