For now, we explicitly require AddDistributedCache in Startup so it's not called twice.
This commit is contained in:
@@ -43,8 +43,7 @@ namespace Umbraco.Web.BackOffice.DependencyInjection
|
||||
.AddMvcAndRazor()
|
||||
.AddWebServer()
|
||||
.AddPreviewSupport()
|
||||
.AddHostedServices()
|
||||
.AddDistributedCache();
|
||||
.AddHostedServices();
|
||||
|
||||
/// <summary>
|
||||
/// Adds Umbraco back office authentication requirements
|
||||
|
||||
@@ -6,6 +6,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Umbraco.Core.DependencyInjection;
|
||||
using Umbraco.Extensions;
|
||||
using Umbraco.Infrastructure.DependencyInjection;
|
||||
using Umbraco.Web.BackOffice.DependencyInjection;
|
||||
using Umbraco.Web.BackOffice.Security;
|
||||
using Umbraco.Web.Common.DependencyInjection;
|
||||
@@ -47,6 +48,7 @@ namespace Umbraco.Web.UI.NetCore
|
||||
services.AddUmbraco(_env, _config)
|
||||
.AddBackOffice()
|
||||
.AddWebsite()
|
||||
.AddDistributedCache()
|
||||
.AddComposers()
|
||||
.Build();
|
||||
#pragma warning restore IDE0022 // Use expression body for methods
|
||||
|
||||
@@ -43,8 +43,6 @@ namespace Umbraco.Web.Website.DependencyInjection
|
||||
builder.Services.AddScoped<UmbracoRouteValueTransformer>();
|
||||
builder.Services.AddSingleton<IUmbracoRenderingDefaults, UmbracoRenderingDefaults>();
|
||||
|
||||
builder.AddDistributedCache();
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user