/// <summary> /// Primary constructor. /// </summary> /// <param name="cache"> /// The cache to invalidate. /// </param> public InvalidatorByPage(InstanceByKeyCache <T, int> cache) { this.Cache = cache; UmbracoCachingComponent.RegisterContentByPageInvalidator(this); }
/// <summary> /// Primary constructor. /// </summary> /// <param name="cache"> /// The cache to invalidate. /// </param> /// <param name="aliases"> /// The content type aliases to monitor for changes that will initiate an invalidation. /// </param> public InvalidatorByPageAliases(InstanceCache <T> cache, params string[] aliases) { Cache = cache; MonitoredAliases = aliases.MakeSafe().ToList(); UmbracoCachingComponent.RegisterContentInvalidatorForAliases(this, aliases); }