mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-15 21:04:46 +01:00
fix (cache): RLock instead of lock
This commit is contained in:
parent
66c6788b94
commit
ccb156678b
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue