Merge branch 'temp8' into temp8-di2690
This commit is contained in:
24
src/Umbraco.Web/Cache/DistributedCacheBinderComponent.cs
Normal file
24
src/Umbraco.Web/Cache/DistributedCacheBinderComponent.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Components;
|
||||
using Umbraco.Core.Composing;
|
||||
|
||||
namespace Umbraco.Web.Cache
|
||||
{
|
||||
/// <summary>
|
||||
/// Installs listeners on service events in order to refresh our caches.
|
||||
/// </summary>
|
||||
[RuntimeLevel(MinLevel = RuntimeLevel.Run)]
|
||||
[RequiredByComponent(typeof(IUmbracoCoreComponent))] // runs before every other IUmbracoCoreComponent!
|
||||
public class DistributedCacheBinderComponent : UmbracoComponentBase, IUmbracoCoreComponent
|
||||
{
|
||||
public override void Compose(Composition composition)
|
||||
{
|
||||
composition.RegisterUnique<IDistributedCacheBinder, DistributedCacheBinder>();
|
||||
}
|
||||
|
||||
public void Initialize(IDistributedCacheBinder distributedCacheBinder)
|
||||
{
|
||||
distributedCacheBinder.BindEvents();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user