Merge branch 'release/15.0' into v15/dev
# Conflicts: # src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs # src/Umbraco.Core/Extensions/PublishedContentExtensions.cs # src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/tiptap-toolbar.element.ts # tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/ContentNavigationServiceBaseTests.cs
This commit is contained in:
@@ -86,15 +86,16 @@ public sealed class ContentCacheRefresher : PayloadCacheRefresherBase<ContentCac
|
||||
var idsRemoved = new HashSet<int>();
|
||||
IAppPolicyCache isolatedCache = AppCaches.IsolatedCaches.GetOrCreate<IContent>();
|
||||
|
||||
foreach (JsonPayload payload in payloads.Where(x => x.Id != default))
|
||||
foreach (JsonPayload payload in payloads)
|
||||
{
|
||||
// By INT Id
|
||||
isolatedCache.Clear(RepositoryCacheKeys.GetKey<IContent, int>(payload.Id));
|
||||
|
||||
// By GUID Key
|
||||
isolatedCache.Clear(RepositoryCacheKeys.GetKey<IContent, Guid?>(payload.Key));
|
||||
|
||||
if (payload.Id != default)
|
||||
{
|
||||
// By INT Id
|
||||
isolatedCache.Clear(RepositoryCacheKeys.GetKey<IContent, int>(payload.Id));
|
||||
|
||||
// By GUID Key
|
||||
isolatedCache.Clear(RepositoryCacheKeys.GetKey<IContent, Guid?>(payload.Key));
|
||||
}
|
||||
|
||||
// remove those that are in the branch
|
||||
if (payload.ChangeTypes.HasTypesAny(TreeChangeTypes.RefreshBranch | TreeChangeTypes.Remove))
|
||||
@@ -115,7 +116,10 @@ public sealed class ContentCacheRefresher : PayloadCacheRefresherBase<ContentCac
|
||||
|
||||
HandleNavigation(payload);
|
||||
HandlePublishedAsync(payload, CancellationToken.None).GetAwaiter().GetResult();
|
||||
_idKeyMap.ClearCache(payload.Id);
|
||||
if (payload.Id != default)
|
||||
{
|
||||
_idKeyMap.ClearCache(payload.Id);
|
||||
}
|
||||
if (payload.Key.HasValue)
|
||||
{
|
||||
_idKeyMap.ClearCache(payload.Key.Value);
|
||||
@@ -240,7 +244,7 @@ public sealed class ContentCacheRefresher : PayloadCacheRefresherBase<ContentCac
|
||||
// First creation
|
||||
if (ExistsInNavigation(content.Key) is false && ExistsInNavigationBin(content.Key) is false)
|
||||
{
|
||||
_documentNavigationManagementService.Add(content.Key, GetParentKey(content), content.SortOrder);
|
||||
_documentNavigationManagementService.Add(content.Key, content.ContentType.Key, GetParentKey(content), content.SortOrder);
|
||||
if (content.Trashed)
|
||||
{
|
||||
// If created as trashed, move to bin
|
||||
@@ -368,16 +372,6 @@ public sealed class ContentCacheRefresher : PayloadCacheRefresherBase<ContentCac
|
||||
// TODO (V14): Change into a record
|
||||
public class JsonPayload
|
||||
{
|
||||
public JsonPayload()
|
||||
{ }
|
||||
|
||||
[Obsolete("Use the default constructor and property initializers.")]
|
||||
public JsonPayload(int id, Guid? key, TreeChangeTypes changeTypes)
|
||||
{
|
||||
Id = id;
|
||||
Key = key;
|
||||
ChangeTypes = changeTypes;
|
||||
}
|
||||
|
||||
public int Id { get; init; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user