remove grpc from common calls to reduce locking

This commit is contained in:
rootdarkarchon
2022-12-27 23:49:25 +01:00
parent 761f208828
commit 097d7d16e9

View File

@@ -41,7 +41,7 @@ public class MareConfigurationServiceClient<T> : IConfigurationService<T> where
if (isRemote)
{
_readLock.Wait();
if (_cachedRemoteProperties.TryGetValue(key, out var existingEntry) && existingEntry.Inserted > DateTime.Now - TimeSpan.FromMinutes(60))
if (_cachedRemoteProperties.TryGetValue(key, out var existingEntry))
{
_readLock.Release();
return (T1)_cachedRemoteProperties[key].Value;