For now, we explicitly require AddDistributedCache in Startup so it's not called twice.

This commit is contained in:
Shannon
2021-01-04 13:01:49 +11:00
parent cbc08fb008
commit d46545faa0
3 changed files with 3 additions and 4 deletions

View File

@@ -43,8 +43,7 @@ namespace Umbraco.Web.BackOffice.DependencyInjection
.AddMvcAndRazor()
.AddWebServer()
.AddPreviewSupport()
.AddHostedServices()
.AddDistributedCache();
.AddHostedServices();
/// <summary>
/// Adds Umbraco back office authentication requirements

View File

@@ -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

View File

@@ -43,8 +43,6 @@ namespace Umbraco.Web.Website.DependencyInjection
builder.Services.AddScoped<UmbracoRouteValueTransformer>();
builder.Services.AddSingleton<IUmbracoRenderingDefaults, UmbracoRenderingDefaults>();
builder.AddDistributedCache();
return builder;
}