diff --git a/Core/Cache.cs b/Core/Cache.cs index f574735..e1f6ec4 100644 --- a/Core/Cache.cs +++ b/Core/Cache.cs @@ -22,7 +22,12 @@ namespace FLocal.Core { } } } - return this.cache[id]; + lock(id) { + if(this.cache.ContainsKey(id)) { + return this.cache[id]; + } + } + return this.get(id, getter); } public void delete(object id) {