|
|
@ -45,11 +45,13 @@ namespace Volo.Abp.AspNetCore.Mvc.Client |
|
|
var cacheKey = CreateCacheKey(); |
|
|
var cacheKey = CreateCacheKey(); |
|
|
var httpContext = HttpContextAccessor?.HttpContext; |
|
|
var httpContext = HttpContextAccessor?.HttpContext; |
|
|
|
|
|
|
|
|
if (httpContext != null && httpContext.Items[cacheKey] is ApplicationConfigurationDto configuration) |
|
|
if (httpContext != null && !httpContext.WebSockets.IsWebSocketRequest && httpContext.Items[cacheKey] is ApplicationConfigurationDto configuration) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return configuration; |
|
|
return configuration; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
configuration = await Cache.GetOrAddAsync( |
|
|
configuration = await Cache.GetOrAddAsync( |
|
|
cacheKey, |
|
|
cacheKey, |
|
|
async () => await ApplicationConfigurationAppService.GetAsync(), |
|
|
async () => await ApplicationConfigurationAppService.GetAsync(), |
|
|
@ -59,7 +61,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
if (httpContext != null) |
|
|
if (httpContext != null && !httpContext.WebSockets.IsWebSocketRequest) |
|
|
{ |
|
|
{ |
|
|
httpContext.Items[cacheKey] = configuration; |
|
|
httpContext.Items[cacheKey] = configuration; |
|
|
} |
|
|
} |
|
|
@ -72,7 +74,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client |
|
|
var cacheKey = CreateCacheKey(); |
|
|
var cacheKey = CreateCacheKey(); |
|
|
var httpContext = HttpContextAccessor?.HttpContext; |
|
|
var httpContext = HttpContextAccessor?.HttpContext; |
|
|
|
|
|
|
|
|
if (httpContext != null && httpContext.Items[cacheKey] is ApplicationConfigurationDto configuration) |
|
|
if (httpContext != null && !httpContext.WebSockets.IsWebSocketRequest && httpContext.Items[cacheKey] is ApplicationConfigurationDto configuration) |
|
|
{ |
|
|
{ |
|
|
return configuration; |
|
|
return configuration; |
|
|
} |
|
|
} |
|
|
|