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

27 lines
1003 B
C#
Raw Normal View History

2019-02-14 09:15:47 +01:00
using Umbraco.Core;
2019-01-03 21:00:28 +01:00
using Umbraco.Core.Composing;
using Umbraco.Web.PublishedCache.NuCache.DataSource;
namespace Umbraco.Web.PublishedCache.NuCache
{
public class NuCacheComposer : ComponentComposer<NuCacheComponent>, ICoreComposer
2019-01-03 21:00:28 +01:00
{
public override void Compose(Composition composition)
2019-01-03 21:00:28 +01:00
{
base.Compose(composition);
2019-01-03 21:00:28 +01:00
// register the NuCache database data source
composition.Register<IDataSource, DatabaseDataSource>();
// register the NuCache published snapshot service
// must register default options, required in the service ctor
composition.Register(factory => new PublishedSnapshotServiceOptions());
2019-01-03 21:00:28 +01:00
composition.SetPublishedSnapshotService<PublishedSnapshotService>();
// add the NuCache health check (hidden from type finder)
// TODO: no NuCache health check yet
2019-01-03 21:00:28 +01:00
//composition.HealthChecks().Add<NuCacheIntegrityHealthCheck>();
}
}
}