Browse Source

Merge pull request #19089 from abpframework/auto-merge/prerel-8-1/2519

Merge branch dev with prerel-8.1
pull/19097/head
maliming 2 years ago
committed by GitHub
parent
commit
1a77d85431
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 10
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcRemoteTenantStore.cs
  2. 4
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs

10
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcRemoteTenantStore.cs

@ -40,9 +40,9 @@ public class MvcRemoteTenantStore : ITenantStore, ITransientDependency
}
var tenantConfiguration = await Cache.GetAsync(cacheKey);
if (tenantConfiguration == null)
if (tenantConfiguration?.Value == null)
{
await TenantAppService.FindTenantByNameAsync(normalizedName);
var tenant = await TenantAppService.FindTenantByNameAsync(normalizedName);
tenantConfiguration = await Cache.GetAsync(cacheKey);
}
@ -65,7 +65,7 @@ public class MvcRemoteTenantStore : ITenantStore, ITransientDependency
}
var tenantConfiguration = await Cache.GetAsync(cacheKey);
if (tenantConfiguration == null)
if (tenantConfiguration?.Value == null)
{
await TenantAppService.FindTenantByIdAsync(id);
tenantConfiguration = await Cache.GetAsync(cacheKey);
@ -90,7 +90,7 @@ public class MvcRemoteTenantStore : ITenantStore, ITransientDependency
}
var tenantConfiguration = Cache.Get(cacheKey);
if (tenantConfiguration == null)
if (tenantConfiguration?.Value == null)
{
AsyncHelper.RunSync(async () => await TenantAppService.FindTenantByNameAsync(normalizedName));
tenantConfiguration = Cache.Get(cacheKey);
@ -115,7 +115,7 @@ public class MvcRemoteTenantStore : ITenantStore, ITransientDependency
}
var tenantConfiguration = Cache.Get(cacheKey);
if (tenantConfiguration == null)
if (tenantConfiguration?.Value == null)
{
AsyncHelper.RunSync(async () => await TenantAppService.FindTenantByIdAsync(id));
tenantConfiguration = Cache.Get(cacheKey);

4
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs

@ -54,7 +54,7 @@ public class TenantStore : ITenantStore, ITransientDependency
var cacheKey = CalculateCacheKey(id, normalizedName);
var cacheItem = await Cache.GetAsync(cacheKey, considerUow: true);
if (cacheItem != null)
if (cacheItem?.Value != null)
{
return cacheItem;
}
@ -94,7 +94,7 @@ public class TenantStore : ITenantStore, ITransientDependency
var cacheKey = CalculateCacheKey(id, normalizedName);
var cacheItem = Cache.Get(cacheKey, considerUow: true);
if (cacheItem != null)
if (cacheItem?.Value != null)
{
return cacheItem;
}

Loading…
Cancel
Save