Skip to content

Commit

Permalink
Merge pull request #19090 from abpframework/rel-8.1-PRs
Browse files Browse the repository at this point in the history
Cherry pick commits from `prerel-8.1` to `rel-8.1`.
  • Loading branch information
realLiangshiwei authored Feb 20, 2024
2 parents c77e606 + 4bd0571 commit 992b383
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public MvcRemoteTenantStore(
}

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);
}

Expand All @@ -65,7 +65,7 @@ public MvcRemoteTenantStore(
}

var tenantConfiguration = await Cache.GetAsync(cacheKey);
if (tenantConfiguration == null)
if (tenantConfiguration?.Value == null)
{
await TenantAppService.FindTenantByIdAsync(id);
tenantConfiguration = await Cache.GetAsync(cacheKey);
Expand All @@ -90,7 +90,7 @@ public MvcRemoteTenantStore(
}

var tenantConfiguration = Cache.Get(cacheKey);
if (tenantConfiguration == null)
if (tenantConfiguration?.Value == null)
{
AsyncHelper.RunSync(async () => await TenantAppService.FindTenantByNameAsync(normalizedName));
tenantConfiguration = Cache.Get(cacheKey);
Expand All @@ -115,7 +115,7 @@ public MvcRemoteTenantStore(
}

var tenantConfiguration = Cache.Get(cacheKey);
if (tenantConfiguration == null)
if (tenantConfiguration?.Value == null)
{
AsyncHelper.RunSync(async () => await TenantAppService.FindTenantByIdAsync(id));
tenantConfiguration = Cache.Get(cacheKey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ private static void ReplaceLeptonXThemePackagesFromPackageJsonFiles(List<Project

private static void DeleteUnrelatedProjects(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps)
{
if (!context.BuildArgs.PublicWebSite)
{
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.PublicWeb", null, "apps/public-web/src/MyCompanyName.MyProjectName.PublicWeb"));
steps.Add(new RemoveFolderStep("/apps/public-web"));
steps.Add(new RemoveProjectFromTyeStep("public-web"));
steps.Add(new RemoveProjectFromPrometheusStep("public-web"));
}

//TODO: move common tasks to methods
switch (context.BuildArgs.UiFramework)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected virtual async Task<TenantConfigurationCacheItem> GetCacheItemAsync(Gui
var cacheKey = CalculateCacheKey(id, normalizedName);

var cacheItem = await Cache.GetAsync(cacheKey, considerUow: true);
if (cacheItem != null)
if (cacheItem?.Value != null)
{
return cacheItem;
}
Expand Down Expand Up @@ -94,7 +94,7 @@ protected virtual TenantConfigurationCacheItem GetCacheItem(Guid? id, string nor
var cacheKey = CalculateCacheKey(id, normalizedName);

var cacheItem = Cache.Get(cacheKey, considerUow: true);
if (cacheItem != null)
if (cacheItem?.Value != null)
{
return cacheItem;
}
Expand Down

0 comments on commit 992b383

Please sign in to comment.