Refactor components
This commit is contained in:
26
src/Umbraco.Web/PublishedCache/NuCache/NuCacheComposer.cs
Normal file
26
src/Umbraco.Web/PublishedCache/NuCache/NuCacheComposer.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Umbraco.Core.Components;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Web.PublishedCache.NuCache.DataSource;
|
||||
|
||||
namespace Umbraco.Web.PublishedCache.NuCache
|
||||
{
|
||||
public class NuCacheComposer : ICoreComposer
|
||||
{
|
||||
public void Compose(Composition composition)
|
||||
{
|
||||
// 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 PublishedSnapshotService.Options());
|
||||
composition.SetPublishedSnapshotService<PublishedSnapshotService>();
|
||||
|
||||
// add the NuCache health check (hidden from type finder)
|
||||
// todo - no NuCache health check yet
|
||||
//composition.HealthChecks().Add<NuCacheIntegrityHealthCheck>();
|
||||
|
||||
composition.Components().Append<NuCacheComponent>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user