using Umbraco.Core; using Umbraco.Core.Components; using Umbraco.Core.Logging; using Umbraco.Core.Scoping; using Umbraco.Core.Services; using LightInject; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Persistence.Repositories; namespace Umbraco.Web.PublishedCache.NuCache { public class NuCacheComponent : UmbracoComponentBase, IUmbracoCoreComponent { public override void Compose(Composition composition) { base.Compose(composition); // register the NuCache published snapshot service // must register default options, required in the service ctor composition.Container.Register(factory => new PublishedSnapshotService.Options()); composition.SetPublishedSnapshotService(); // add the NuCache health check (hidden from type finder) // todo - no NuCache health check yet //composition.HealthChecks().Add(); } public void Initialize(IPublishedSnapshotService service) { // nothing - this just ensures that the service is created at boot time } } }