Skip to content

Commit 6fca686

Browse files
committed
Don't process content items multiple times in the scheduled job
A content item can be tagged with multiple tags, which would make them end up multiple times in the GetTaggedContentGuids list. Filtering out duplicates cleans this list and avoids doing duplicate processing. This speeds up the job greatly, especially in sites with heavy tag usage
1 parent 2bcdff8 commit 6fca686

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Geta.Optimizely.Tags/TagsScheduledJob.cs

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ private static IEnumerable<Guid> GetTaggedContentGuids(IEnumerable<Tag> tags)
128128
{
129129
return tags.Where(x => x?.PermanentLinks != null)
130130
.SelectMany(x => x.PermanentLinks)
131+
.Distinct()
131132
.ToList();
132133
}
133134

0 commit comments

Comments
 (0)