removes unneeded ctor param
This commit is contained in:
@@ -166,7 +166,7 @@ namespace Umbraco.Tests.Cache
|
||||
IOHelper);
|
||||
|
||||
// just assert it does not throw
|
||||
var refreshers = new DistributedCacheBinder(null, umbracoContextFactory, null, new CacheRefresherCollection(Array.Empty<ICacheRefresher>()));
|
||||
var refreshers = new DistributedCacheBinder(null, umbracoContextFactory, null);
|
||||
refreshers.HandleEvents(definitions);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Umbraco.Tests.Integration
|
||||
{
|
||||
base.SetUp();
|
||||
|
||||
_h1 = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>(), Current.CacheRefreshers);
|
||||
_h1 = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>());
|
||||
_h1.BindEvents(true);
|
||||
|
||||
_events = new List<EventInstance>();
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace Umbraco.Tests.Scoping
|
||||
var umbracoContext = GetUmbracoContextNu("http://example.com/", setSingleton: true);
|
||||
|
||||
// wire cache refresher
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>(), Current.CacheRefreshers);
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>());
|
||||
_distributedCacheBinder.BindEvents(true);
|
||||
|
||||
// create document type, document
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Umbraco.Tests.Scoping
|
||||
// get user again - else we'd modify the one that's in the cache
|
||||
user = service.GetUserById(user.Id);
|
||||
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>(), Current.CacheRefreshers);
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>());
|
||||
_distributedCacheBinder.BindEvents(true);
|
||||
|
||||
Assert.IsNull(scopeProvider.AmbientScope);
|
||||
@@ -156,7 +156,7 @@ namespace Umbraco.Tests.Scoping
|
||||
Assert.AreEqual(lang.Id, globalCached.Id);
|
||||
Assert.AreEqual("fr-FR", globalCached.IsoCode);
|
||||
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>(), Current.CacheRefreshers);
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>());
|
||||
_distributedCacheBinder.BindEvents(true);
|
||||
|
||||
Assert.IsNull(scopeProvider.AmbientScope);
|
||||
@@ -248,7 +248,7 @@ namespace Umbraco.Tests.Scoping
|
||||
Assert.AreEqual(item.Id, globalCached.Id);
|
||||
Assert.AreEqual("item-key", globalCached.ItemKey);
|
||||
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>(), Current.CacheRefreshers);
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>());
|
||||
_distributedCacheBinder.BindEvents(true);
|
||||
|
||||
Assert.IsNull(scopeProvider.AmbientScope);
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace Umbraco.Tests.Scoping
|
||||
var item = new Content("name", -1, contentType);
|
||||
|
||||
// wire cache refresher
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>(), Current.CacheRefreshers);
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>());
|
||||
_distributedCacheBinder.BindEvents(true);
|
||||
|
||||
// check xml in context = "before"
|
||||
@@ -206,7 +206,7 @@ namespace Umbraco.Tests.Scoping
|
||||
Current.Services.ContentTypeService.Save(contentType);
|
||||
|
||||
// wire cache refresher
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>(), Current.CacheRefreshers);
|
||||
_distributedCacheBinder = new DistributedCacheBinder(new DistributedCache(Current.ServerMessenger, Current.CacheRefreshers), Mock.Of<IUmbracoContextFactory>(), Mock.Of<ILogger>());
|
||||
_distributedCacheBinder.BindEvents(true);
|
||||
|
||||
// check xml in context = "before"
|
||||
|
||||
@@ -20,16 +20,14 @@ namespace Umbraco.Web.Cache
|
||||
private readonly DistributedCache _distributedCache;
|
||||
private readonly IUmbracoContextFactory _umbracoContextFactory;
|
||||
private readonly ILogger _logger;
|
||||
private readonly CacheRefresherCollection _cacheRefresherCollection;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DistributedCacheBinder"/> class.
|
||||
/// </summary>
|
||||
public DistributedCacheBinder(DistributedCache distributedCache, IUmbracoContextFactory umbracoContextFactory, ILogger logger, CacheRefresherCollection cacheRefresherCollection)
|
||||
public DistributedCacheBinder(DistributedCache distributedCache, IUmbracoContextFactory umbracoContextFactory, ILogger logger)
|
||||
{
|
||||
_distributedCache = distributedCache;
|
||||
_logger = logger;
|
||||
_cacheRefresherCollection = cacheRefresherCollection;
|
||||
_umbracoContextFactory = umbracoContextFactory;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user