mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 15:11:10 +00:00
Caches the theme API responses
This commit is contained in:
1 parent
88db2e0801
commit
60b551558f
5 files changed
+385
-2
No files matched your search
+4
-1
@@ -292,10 +292,13 @@ public static class PresentationWebLayerServices
|
||||
// register the HTTP typed client used for the API interaction
|
||||
services.AddHttpClient<IApiHttpClient, ApiHttpClient>()
|
||||
.AddHttpMessageHandler<CachedAuthorizationHandler>()
|
||||
.AddHttpMessageHandler<CachedThemeHandler>()
|
||||
.AddPolicyHandler(retryPolicy)
|
||||
.AddPolicyHandler(circuitBreakerPolicy);
|
||||
|
||||
services.AddScoped<CachedAuthorizationHandler>();
|
||||
services.AddScoped<CachedThemeHandler>();
|
||||
services.AddScoped<ThemeCachePreferenceService>();
|
||||
|
||||
// enable access to the current HTTP context in non-controller classes
|
||||
services.AddHttpContextAccessor();
|
||||
@@ -314,7 +317,7 @@ public static class PresentationWebLayerServices
|
||||
services.AddScoped<Authorization.IAuthorizationService, AuthorizationService>();
|
||||
services.AddSingleton<ICryptographyService, CryptographyService>();
|
||||
services.AddSingleton<IUrlService, UrlService>();
|
||||
services.AddHybridCache(); // used for caching authorization roles, permissions and policies
|
||||
services.AddHybridCache(); // used for caching authorization roles, permissions, policies and theme data
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user