fix (cache): RLock instead of lock

This commit is contained in:
Mickael Kerjean 2022-09-13 13:01:03 +10:00
parent 66c6788b94
commit ccb156678b

View file

@ -86,9 +86,9 @@ func NewKeyValueStore() KeyValueStore {
func (this *KeyValueStore) Get(key string) interface{} {
var val interface{}
this.Lock()
this.RLock()
val = this.cache[key]
this.Unlock()
this.RUnlock()
return val
}