Skip cache refresher operations for content blueprints (#15633)

* Skip cache refresher operations for content blueprints

* Fix JsonPayload deserialization error by adding a default constructor and property initializers

* Obsolete JsonPayload constructor and update usages
This commit is contained in:
Ronald Barendse
2024-02-01 09:55:09 +01:00
committed by Bjarke Berg
parent ac02e97e0c
commit 4aed6a1034
7 changed files with 239 additions and 50 deletions

View File

@@ -53,13 +53,15 @@ public sealed class ContentIndexingNotificationHandler :
foreach (ContentCacheRefresher.JsonPayload payload in (ContentCacheRefresher.JsonPayload[])args.MessageObject)
{
if (payload.Blueprint)
{
// Skip blueprints
continue;
}
if (payload.ChangeTypes.HasType(TreeChangeTypes.Remove))
{
if (deleteBatch == null)
{
deleteBatch = new HashSet<int>();
}
deleteBatch ??= new HashSet<int>();
deleteBatch.Add(payload.Id);
}
else if (payload.ChangeTypes.HasType(TreeChangeTypes.RefreshAll))