Browse Source

Merge pull request #11006 from abpframework/liangshiwei/patch-1

Fix the performance problem of blazor-server
pull/11009/head
maliming 5 years ago
committed by GitHub
parent
commit
4286333761
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcCachedApplicationConfigurationClient.cs

7
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcCachedApplicationConfigurationClient.cs

@ -45,9 +45,8 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
var cacheKey = CreateCacheKey();
var httpContext = HttpContextAccessor?.HttpContext;
if (httpContext != null && !httpContext.WebSockets.IsWebSocketRequest && httpContext.Items[cacheKey] is ApplicationConfigurationDto configuration)
if (httpContext != null && httpContext.Items[cacheKey] is ApplicationConfigurationDto configuration)
{
return configuration;
}
@ -61,7 +60,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
}
);
if (httpContext != null && !httpContext.WebSockets.IsWebSocketRequest)
if (httpContext != null)
{
httpContext.Items[cacheKey] = configuration;
}
@ -74,7 +73,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
var cacheKey = CreateCacheKey();
var httpContext = HttpContextAccessor?.HttpContext;
if (httpContext != null && !httpContext.WebSockets.IsWebSocketRequest && httpContext.Items[cacheKey] is ApplicationConfigurationDto configuration)
if (httpContext != null && httpContext.Items[cacheKey] is ApplicationConfigurationDto configuration)
{
return configuration;
}

Loading…
Cancel
Save