From ccb156678b845041c0f18d9a1945ab64ed0162f8 Mon Sep 17 00:00:00 2001 From: Mickael Kerjean Date: Tue, 13 Sep 2022 13:01:03 +1000 Subject: [PATCH] fix (cache): RLock instead of lock --- server/common/cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/common/cache.go b/server/common/cache.go index 4b453f6e..8df88be1 100644 --- a/server/common/cache.go +++ b/server/common/cache.go @@ -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 }