Browse Source

Re-enable async lock on distributed cache

pull/969/head
Halil ibrahim Kalkan 7 years ago
parent
commit
4fc6a2e8d2
  1. 6
      framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs

6
framework/src/Volo.Abp.Caching/Volo/Abp/Caching/DistributedCache.cs

@ -30,7 +30,7 @@ namespace Volo.Abp.Caching
protected ICurrentTenant CurrentTenant { get; } protected ICurrentTenant CurrentTenant { get; }
//protected AsyncLock AsyncLock { get; } = new AsyncLock(); protected AsyncLock AsyncLock { get; } = new AsyncLock();
protected DistributedCacheEntryOptions DefaultCacheOptions; protected DistributedCacheEntryOptions DefaultCacheOptions;
@ -135,7 +135,7 @@ namespace Volo.Abp.Caching
return value; return value;
} }
//using (AsyncLock.Lock(CancellationTokenProvider.Token)) using (AsyncLock.Lock(CancellationTokenProvider.Token))
{ {
value = Get(key, hideErrors); value = Get(key, hideErrors);
if (value != null) if (value != null)
@ -164,7 +164,7 @@ namespace Volo.Abp.Caching
return value; return value;
} }
//using (await AsyncLock.LockAsync(token)) using (await AsyncLock.LockAsync(token))
{ {
value = await GetAsync(key, hideErrors, token); value = await GetAsync(key, hideErrors, token);
if (value != null) if (value != null)

Loading…
Cancel
Save