Files
Umbraco-CMS/src/Umbraco.Web/PublishedCache/NuCache/NuCacheComponent.cs

34 lines
1.2 KiB
C#
Raw Normal View History

using Umbraco.Core;
using Umbraco.Core.Components;
using Umbraco.Core.Logging;
2017-05-12 14:49:44 +02:00
using Umbraco.Core.Scoping;
using Umbraco.Core.Services;
2017-05-22 17:22:10 +02:00
using LightInject;
2017-10-17 17:43:15 +02:00
using Umbraco.Core.Models.PublishedContent;
2017-12-14 17:04:44 +01:00
using Umbraco.Core.Persistence.Repositories;
namespace Umbraco.Web.PublishedCache.NuCache
{
public class NuCacheComponent : UmbracoComponentBase, IUmbracoCoreComponent
{
public override void Compose(Composition composition)
{
base.Compose(composition);
2017-10-31 12:48:24 +01:00
// register the NuCache published snapshot service
2018-03-30 14:00:44 +02:00
// must register default options, required in the service ctor
composition.Container.Register(factory => new PublishedSnapshotService.Options());
composition.SetPublishedSnapshotService<PublishedSnapshotService>();
2016-09-08 18:43:58 +02:00
// add the NuCache health check (hidden from type finder)
// todo - no NuCache health check yet
//composition.HealthChecks().Add<NuCacheIntegrityHealthCheck>();
}
2017-10-31 12:48:24 +01:00
public void Initialize(IPublishedSnapshotService service)
{
// nothing - this just ensures that the service is created at boot time
}
}
}