diff --git a/src/Umbraco.Core/Models/CacheSettings.cs b/src/Umbraco.Core/Models/CacheSettings.cs
index d80ab48c88..94cf80b4d6 100644
--- a/src/Umbraco.Core/Models/CacheSettings.cs
+++ b/src/Umbraco.Core/Models/CacheSettings.cs
@@ -8,19 +8,39 @@ public class CacheSettings
{
internal const int StaticDocumentBreadthFirstSeedCount = 100;
internal const int StaticMediaBreadthFirstSeedCount = 100;
+ internal const int StaticDocumentSeedBatchSize = 100;
+ internal const int StaticMediaSeedBatchSize = 100;
///
- /// Gets or sets a value for the collection of content type ids to always have in the cache.
+ /// Gets or sets a value for the collection of content type ids to always have in the cache.
///
public List ContentTypeKeys { get; set; } =
new();
+ ///
+ /// Gets or sets a value for the document breadth first seed count.
+ ///
[DefaultValue(StaticDocumentBreadthFirstSeedCount)]
public int DocumentBreadthFirstSeedCount { get; set; } = StaticDocumentBreadthFirstSeedCount;
+ ///
+ /// Gets or sets a value for the media breadth first seed count.
+ ///
[DefaultValue(StaticMediaBreadthFirstSeedCount)]
public int MediaBreadthFirstSeedCount { get; set; } = StaticDocumentBreadthFirstSeedCount;
+ ///
+ /// Gets or sets a value for the document seed batch size.
+ ///
+ [DefaultValue(StaticDocumentSeedBatchSize)]
+ public int DocumentSeedBatchSize { get; set; } = StaticDocumentSeedBatchSize;
+
+ ///
+ /// Gets or sets a value for the media seed batch size.
+ ///
+ [DefaultValue(StaticMediaSeedBatchSize)]
+ public int MediaSeedBatchSize { get; set; } = StaticMediaSeedBatchSize;
+
public CacheEntry Entry { get; set; } = new CacheEntry();
public class CacheEntry
diff --git a/src/Umbraco.PublishedCache.HybridCache/Services/DocumentCacheService.cs b/src/Umbraco.PublishedCache.HybridCache/Services/DocumentCacheService.cs
index 1e68acad7f..6457773e31 100644
--- a/src/Umbraco.PublishedCache.HybridCache/Services/DocumentCacheService.cs
+++ b/src/Umbraco.PublishedCache.HybridCache/Services/DocumentCacheService.cs
@@ -195,8 +195,7 @@ internal sealed class DocumentCacheService : IDocumentCacheService
sw.Start();
#endif
- const int GroupSize = 100;
- foreach (IEnumerable group in SeedKeys.InGroupsOf(GroupSize))
+ foreach (IEnumerable group in SeedKeys.InGroupsOf(_cacheSettings.DocumentSeedBatchSize))
{
var uncachedKeys = new HashSet();
foreach (Guid key in group)
diff --git a/src/Umbraco.PublishedCache.HybridCache/Services/MediaCacheService.cs b/src/Umbraco.PublishedCache.HybridCache/Services/MediaCacheService.cs
index ca9691a1c4..0a8283279a 100644
--- a/src/Umbraco.PublishedCache.HybridCache/Services/MediaCacheService.cs
+++ b/src/Umbraco.PublishedCache.HybridCache/Services/MediaCacheService.cs
@@ -158,8 +158,7 @@ internal sealed class MediaCacheService : IMediaCacheService
sw.Start();
#endif
- const int GroupSize = 100;
- foreach (IEnumerable group in SeedKeys.InGroupsOf(GroupSize))
+ foreach (IEnumerable group in SeedKeys.InGroupsOf(_cacheSettings.MediaSeedBatchSize))
{
var uncachedKeys = new HashSet();
foreach (Guid key in group)