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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
4 deletions
-
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; |
|
|
|
} |
|
|
|
|