V9/tmp nucache lock (#12149)

* wrapping SetAllFastSortedLocked in try catch

* Potential issue mitigation by retrieving all data from the database at once instead of one at a time while populating the NuCache file.

* Moved content retrieval to within the try-catch block.

* using InGroupsOf() to retrieve content without loading absolutely everything into memory.

* added "old" method signatures to prevent breaking change in ContentStore

* Revert code style cleanups for clarity

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
This commit is contained in:
Robert Foster
2022-04-19 20:31:38 +09:30
committed by GitHub
parent f7615a93d5
commit bef052ad3a
3 changed files with 179 additions and 74 deletions

View File

@@ -13,6 +13,7 @@ namespace Umbraco.Cms.Core.Configuration.Models
{
internal const string StaticNuCacheSerializerType = "MessagePack";
internal const int StaticSqlPageSize = 1000;
internal const int StaticKitBatchSize = 1;
/// <summary>
/// Gets or sets a value defining the BTree block size.
@@ -31,6 +32,12 @@ namespace Umbraco.Cms.Core.Configuration.Models
[DefaultValue(StaticSqlPageSize)]
public int SqlPageSize { get; set; } = StaticSqlPageSize;
/// <summary>
/// The size to use for nucache Kit batches. Higher value means more content loaded into memory at a time.
/// </summary>
[DefaultValue(StaticKitBatchSize)]
public int KitBatchSize { get; set; } = StaticKitBatchSize;
public bool UnPublishedContentCompression { get; set; } = false;
}
}