New IPublishedSnapshotStatus, reduces IPublishedSnapshotService

This commit is contained in:
Shannon
2020-12-21 17:41:12 +11:00
parent e8f5aa8ebc
commit c761fa0506
10 changed files with 146 additions and 117 deletions

View File

@@ -27,6 +27,10 @@ namespace Umbraco.Web.PublishedCache.NuCache
builder.Services.AddTransient(factory => new PublishedSnapshotServiceOptions());
builder.SetPublishedSnapshotService<PublishedSnapshotService>();
// Add as itself
builder.Services.AddSingleton<PublishedSnapshotService>();
builder.Services.AddSingleton<IPublishedSnapshotStatus, PublishedSnapshotStatus>();
// replace this service since we want to improve the content/media
// mapping lookups if we are using nucache.
// TODO: Gotta wonder how much this does actually improve perf? It's a lot of weird code to make this happen so hope it's worth it