V15: Add custom serializer for hybrid cache (#17727)
* Add custom serializer * Add migration to rebuild cache * Rename migration namespace to 15.1 * Also clear media cache * Remove failed cache items * Refactor to only use keys for document cache repository --------- Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Umbraco.Cms.Core.Cache;
|
||||
using Umbraco.Cms.Core.Configuration.Models;
|
||||
using Umbraco.Cms.Core.DependencyInjection;
|
||||
using Umbraco.Cms.Core.Notifications;
|
||||
@@ -35,7 +34,7 @@ public static class UmbracoBuilderExtensions
|
||||
// We'll be a bit friendlier and default this to a higher value, you quickly hit the 1MB limit with a few languages and especially blocks.
|
||||
// This can be overwritten later if needed.
|
||||
options.MaximumPayloadBytes = 1024 * 1024 * 100; // 100MB
|
||||
});
|
||||
}).AddSerializer<ContentCacheNode, HybridCacheSerializer>();
|
||||
#pragma warning restore EXTEXP0018
|
||||
builder.Services.AddSingleton<IDatabaseCacheRepository, DatabaseCacheRepository>();
|
||||
builder.Services.AddSingleton<IPublishedContentCache, DocumentCache>();
|
||||
|
||||
Reference in New Issue
Block a user