|
8 | 8 | using Microsoft.Extensions.Logging.Abstractions;
|
9 | 9 | using Microsoft.Extensions.Options;
|
10 | 10 | using Umbraco.Cms.Core.Cache;
|
| 11 | +using Umbraco.Cms.Core.Cache.PartialViewCacheInvalidators; |
11 | 12 | using Umbraco.Cms.Core.Composing;
|
12 | 13 | using Umbraco.Cms.Core.Configuration;
|
13 | 14 | using Umbraco.Cms.Core.Configuration.Models;
|
14 | 15 | using Umbraco.Cms.Core.Diagnostics;
|
15 | 16 | using Umbraco.Cms.Core.Dictionary;
|
| 17 | +using Umbraco.Cms.Core.DynamicRoot; |
16 | 18 | using Umbraco.Cms.Core.Editors;
|
17 | 19 | using Umbraco.Cms.Core.Events;
|
18 | 20 | using Umbraco.Cms.Core.Features;
|
|
32 | 34 | using Umbraco.Cms.Core.Security;
|
33 | 35 | using Umbraco.Cms.Core.Services;
|
34 | 36 | using Umbraco.Cms.Core.Services.ContentTypeEditing;
|
35 |
| -using Umbraco.Cms.Core.DynamicRoot; |
36 | 37 | using Umbraco.Cms.Core.Preview;
|
37 | 38 | using Umbraco.Cms.Core.PublishedCache;
|
38 | 39 | using Umbraco.Cms.Core.PublishedCache.Internal;
|
@@ -389,6 +390,11 @@ private void AddCoreServices()
|
389 | 390 | Services.AddUnique<IDataTypeConfigurationCache, DataTypeConfigurationCache>();
|
390 | 391 | Services.AddNotificationHandler<DataTypeCacheRefresherNotification, DataTypeConfigurationCacheRefresher>();
|
391 | 392 |
|
| 393 | + // Partial view cache invalidators (no-op, shipped implementation is added in Umbraco.Web.Website, but we |
| 394 | + // need this to ensure we have a service registered for this interface even in headless setups). |
| 395 | + // See: https://github.com/umbraco/Umbraco-CMS/issues/19661 |
| 396 | + Services.AddUnique<IMemberPartialViewCacheInvalidator, NoopMemberPartialViewCacheInvalidator>(); |
| 397 | + |
392 | 398 | // Two factor providers
|
393 | 399 | Services.AddUnique<ITwoFactorLoginService, TwoFactorLoginService>();
|
394 | 400 | Services.AddUnique<IUserTwoFactorLoginService, UserTwoFactorLoginService>();
|
|
0 commit comments