diff --git a/src/Umbraco.Web/Editors/TemplateQueryController.cs b/src/Umbraco.Web/Editors/TemplateQueryController.cs
index f614d38ecb..0d0438138a 100644
--- a/src/Umbraco.Web/Editors/TemplateQueryController.cs
+++ b/src/Umbraco.Web/Editors/TemplateQueryController.cs
@@ -59,8 +59,7 @@ namespace Umbraco.Web.Editors
public QueryResultModel PostTemplateQuery(QueryModel model)
{
- var umbraco = new UmbracoHelper(UmbracoContext, Services, ApplicationCache);
-
+
var queryResult = new QueryResultModel();
var sb = new StringBuilder();
@@ -72,7 +71,7 @@ namespace Umbraco.Web.Editors
timer.Start();
- var currentPage = umbraco.ContentAtRoot().FirstOrDefault();
+ var currentPage = Umbraco.ContentAtRoot().FirstOrDefault();
timer.Stop();
var pointerNode = currentPage;
@@ -80,7 +79,7 @@ namespace Umbraco.Web.Editors
// adjust the "FROM"
if (model != null && model.Source != null && model.Source.Id > 0)
{
- var targetNode = umbraco.Content(model.Source.Id);
+ var targetNode = Umbraco.Content(model.Source.Id);
if (targetNode != null)
{
diff --git a/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs b/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs
index 163284cf86..56d00e8ec9 100644
--- a/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs
+++ b/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs
@@ -80,7 +80,7 @@ namespace Umbraco.Web.Mvc
/// Exposes an UmbracoHelper
///
protected UmbracoHelper Umbraco => _helper
- ?? (_helper = new UmbracoHelper(Current.UmbracoContext, Current.Services, Current.ApplicationCache));
+ ?? (_helper = new UmbracoHelper(Current.UmbracoContext, Current.Services));
public override void OnActionExecuted(ActionExecutedContext filterContext)
{
diff --git a/src/Umbraco.Web/Mvc/PluginController.cs b/src/Umbraco.Web/Mvc/PluginController.cs
index f2742ce9f0..2b4ebc3f71 100644
--- a/src/Umbraco.Web/Mvc/PluginController.cs
+++ b/src/Umbraco.Web/Mvc/PluginController.cs
@@ -82,7 +82,7 @@ namespace Umbraco.Web.Mvc
get
{
return _umbracoHelper
- ?? (_umbracoHelper = new UmbracoHelper(UmbracoContext, Services, ApplicationCache));
+ ?? (_umbracoHelper = new UmbracoHelper(UmbracoContext, Services));
}
internal set // tests
{
diff --git a/src/Umbraco.Web/Mvc/UmbracoController.cs b/src/Umbraco.Web/Mvc/UmbracoController.cs
index 563b315de5..b8b55ae35d 100644
--- a/src/Umbraco.Web/Mvc/UmbracoController.cs
+++ b/src/Umbraco.Web/Mvc/UmbracoController.cs
@@ -83,7 +83,7 @@ namespace Umbraco.Web.Mvc
/// Gets the Umbraco helper.
///
public UmbracoHelper Umbraco => _umbracoHelper
- ?? (_umbracoHelper = new UmbracoHelper(UmbracoContext, Services, ApplicationCache));
+ ?? (_umbracoHelper = new UmbracoHelper(UmbracoContext, Services));
///
/// Gets the web security helper.
diff --git a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs
index 6fa6750031..bd1dd1ed6b 100644
--- a/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs
+++ b/src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs
@@ -98,8 +98,8 @@ namespace Umbraco.Web.Mvc
if (content == null && model is IContentModel)
content = ((IContentModel) model).Content;
_helper = content == null
- ? new UmbracoHelper(UmbracoContext, Services, ApplicationCache)
- : new UmbracoHelper(UmbracoContext, Services, ApplicationCache, content);
+ ? new UmbracoHelper(UmbracoContext, Services)
+ : new UmbracoHelper(UmbracoContext, Services, content);
return _helper;
}
}
diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MacroContainerValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MacroContainerValueConverter.cs
index cd2f4e5384..5a0fc87cb0 100644
--- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MacroContainerValueConverter.cs
+++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MacroContainerValueConverter.cs
@@ -21,13 +21,11 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
{
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
private readonly ServiceContext _services;
- private readonly CacheHelper _appCache;
- public MacroContainerValueConverter(IUmbracoContextAccessor umbracoContextAccessor, ServiceContext services, CacheHelper appCache)
+ public MacroContainerValueConverter(IUmbracoContextAccessor umbracoContextAccessor, ServiceContext services)
{
_umbracoContextAccessor = umbracoContextAccessor ?? throw new ArgumentNullException(nameof(umbracoContextAccessor));
_services = services ?? throw new ArgumentNullException(nameof(services));
- _appCache = appCache ?? throw new ArgumentNullException(nameof(appCache));
}
public override bool IsConverter(PublishedPropertyType propertyType)
@@ -50,7 +48,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
{
var sb = new StringBuilder();
- var umbracoHelper = new UmbracoHelper(umbracoContext, _services, _appCache);
+ var umbracoHelper = new UmbracoHelper(umbracoContext, _services);
MacroTagParser.ParseMacros(
source,
//callback for when text block is found
diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs
index 407ea481c4..6c2a4331d0 100644
--- a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs
+++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksLegacyValueConverter.cs
@@ -24,13 +24,11 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
private readonly ILogger _logger;
private readonly ServiceContext _services;
- private readonly CacheHelper _appCache;
- public RelatedLinksLegacyValueConverter(IUmbracoContextAccessor umbracoContextAccessor, ServiceContext services, CacheHelper appCache, ILogger logger)
+ public RelatedLinksLegacyValueConverter(IUmbracoContextAccessor umbracoContextAccessor, ServiceContext services, ILogger logger)
{
_umbracoContextAccessor = umbracoContextAccessor;
_services = services;
- _appCache = appCache;
_logger = logger;
}
@@ -56,7 +54,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
//update the internal links if we have a context
if (UmbracoContext.Current != null)
{
- var helper = new UmbracoHelper(_umbracoContextAccessor.UmbracoContext, _services, _appCache);
+ var helper = new UmbracoHelper(_umbracoContextAccessor.UmbracoContext, _services);
foreach (var a in obj)
{
var type = a.Value("type");
diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs
index 74a5fb313c..7a089b6f9e 100644
--- a/src/Umbraco.Web/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs
+++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs
@@ -22,7 +22,6 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
{
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
private readonly ServiceContext _services;
- private readonly CacheHelper _appCache;
public override PropertyCacheLevel GetPropertyCacheLevel(PublishedPropertyType propertyType)
{
@@ -31,11 +30,10 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
return PropertyCacheLevel.Snapshot;
}
- public RteMacroRenderingValueConverter(IUmbracoContextAccessor umbracoContextAccessor, ServiceContext services, CacheHelper appCache)
+ public RteMacroRenderingValueConverter(IUmbracoContextAccessor umbracoContextAccessor, ServiceContext services)
{
_umbracoContextAccessor = umbracoContextAccessor;
_services = services;
- _appCache = appCache;
}
// NOT thread-safe over a request because it modifies the
@@ -49,7 +47,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
{
var sb = new StringBuilder();
- var umbracoHelper = new UmbracoHelper(umbracoContext, _services, _appCache);
+ var umbracoHelper = new UmbracoHelper(umbracoContext, _services);
MacroTagParser.ParseMacros(
source,
//callback for when text block is found
diff --git a/src/Umbraco.Web/RelatedLinksTypeConverter.cs b/src/Umbraco.Web/RelatedLinksTypeConverter.cs
index 9ed9398d2e..647959b920 100644
--- a/src/Umbraco.Web/RelatedLinksTypeConverter.cs
+++ b/src/Umbraco.Web/RelatedLinksTypeConverter.cs
@@ -92,7 +92,7 @@ namespace Umbraco.Web
}
//DO NOT assign to _umbracoHelper variable, this is a singleton class and we cannot assign this based on an UmbracoHelper which is request based
- return new UmbracoHelper(UmbracoContext.Current, Current.Services, Current.ApplicationCache);
+ return new UmbracoHelper(UmbracoContext.Current, Current.Services);
}
}
}
diff --git a/src/Umbraco.Web/UI/Controls/UmbracoControl.cs b/src/Umbraco.Web/UI/Controls/UmbracoControl.cs
index 744b77ac50..923ab00c6b 100644
--- a/src/Umbraco.Web/UI/Controls/UmbracoControl.cs
+++ b/src/Umbraco.Web/UI/Controls/UmbracoControl.cs
@@ -16,10 +16,10 @@ namespace Umbraco.Web.UI.Controls
{
private UrlHelper _url;
- protected UmbracoControl(UmbracoContext umbracoContext, ServiceContext services, CacheHelper appCache)
+ protected UmbracoControl(UmbracoContext umbracoContext, ServiceContext services)
{
UmbracoContext = umbracoContext ?? throw new ArgumentNullException(nameof(umbracoContext));
- Umbraco = new UmbracoHelper(umbracoContext, services, appCache);
+ Umbraco = new UmbracoHelper(umbracoContext, services);
// fixme inject somehow
Logger = Current.Logger;
@@ -31,7 +31,7 @@ namespace Umbraco.Web.UI.Controls
/// Empty constructor, uses Singleton to resolve the UmbracoContext.
///
protected UmbracoControl()
- : this(Current.UmbracoContext, Current.Services, Current.ApplicationCache)
+ : this(Current.UmbracoContext, Current.Services)
{ }
///
diff --git a/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs b/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs
index 5359592578..2a2aa43bb9 100644
--- a/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs
+++ b/src/Umbraco.Web/UI/Controls/UmbracoUserControl.cs
@@ -27,12 +27,11 @@ namespace Umbraco.Web.UI.Controls
///
///
///
- ///
- protected UmbracoUserControl(UmbracoContext umbracoContext, ServiceContext services, CacheHelper appCache)
+ protected UmbracoUserControl(UmbracoContext umbracoContext, ServiceContext services)
{
if (umbracoContext == null) throw new ArgumentNullException(nameof(umbracoContext));
UmbracoContext = umbracoContext;
- Umbraco = new UmbracoHelper(umbracoContext, services, appCache);
+ Umbraco = new UmbracoHelper(umbracoContext, services);
Members = new MembershipHelper(umbracoContext);
// fixme inject somehow
@@ -45,7 +44,7 @@ namespace Umbraco.Web.UI.Controls
/// Empty constructor, uses Singleton to resolve the UmbracoContext
///
protected UmbracoUserControl()
- : this(Current.UmbracoContext, Current.Services, Current.ApplicationCache)
+ : this(Current.UmbracoContext, Current.Services)
{ }
// for debugging purposes
diff --git a/src/Umbraco.Web/UmbracoAuthorizedHttpHandler.cs b/src/Umbraco.Web/UmbracoAuthorizedHttpHandler.cs
index 42e3708d1c..1d8475111f 100644
--- a/src/Umbraco.Web/UmbracoAuthorizedHttpHandler.cs
+++ b/src/Umbraco.Web/UmbracoAuthorizedHttpHandler.cs
@@ -13,13 +13,11 @@ namespace Umbraco.Web
protected UmbracoAuthorizedHttpHandler()
{ }
- protected UmbracoAuthorizedHttpHandler(UmbracoContext umbracoContext, ServiceContext services, CacheHelper appCache)
- : base(umbracoContext, services, appCache)
+ protected UmbracoAuthorizedHttpHandler(UmbracoContext umbracoContext, ServiceContext services)
+ : base(umbracoContext, services)
{
}
- private bool _hasValidated = false;
-
///
/// Checks if the umbraco context id is valid
///
diff --git a/src/Umbraco.Web/UmbracoHttpHandler.cs b/src/Umbraco.Web/UmbracoHttpHandler.cs
index e64c4c5fe1..e3a15faf24 100644
--- a/src/Umbraco.Web/UmbracoHttpHandler.cs
+++ b/src/Umbraco.Web/UmbracoHttpHandler.cs
@@ -17,14 +17,14 @@ namespace Umbraco.Web
private UrlHelper _url;
protected UmbracoHttpHandler()
- : this(Current.UmbracoContext, Current.Services, Current.ApplicationCache)
+ : this(Current.UmbracoContext, Current.Services)
{ }
- protected UmbracoHttpHandler(UmbracoContext umbracoContext, ServiceContext services, CacheHelper appCache)
+ protected UmbracoHttpHandler(UmbracoContext umbracoContext, ServiceContext services)
{
if (umbracoContext == null) throw new ArgumentNullException(nameof(umbracoContext));
UmbracoContext = umbracoContext;
- Umbraco = new UmbracoHelper(umbracoContext, services, appCache);
+ Umbraco = new UmbracoHelper(umbracoContext, services);
// fixme inject somehow
Logger = Current.Logger;
diff --git a/src/Umbraco.Web/UmbracoWebService.cs b/src/Umbraco.Web/UmbracoWebService.cs
index 20db7208b5..95764e40a7 100644
--- a/src/Umbraco.Web/UmbracoWebService.cs
+++ b/src/Umbraco.Web/UmbracoWebService.cs
@@ -24,7 +24,7 @@ namespace Umbraco.Web
protected UmbracoWebService()
{
UmbracoContext = Current.UmbracoContext;
- Umbraco = new UmbracoHelper(UmbracoContext, Current.Services, Current.ApplicationCache);
+ Umbraco = new UmbracoHelper(UmbracoContext, Current.Services);
Logger = Current.Logger;
ProfilingLogger = Current.ProfilingLogger;
diff --git a/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs b/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs
index eff5a9cee7..56cc884d39 100644
--- a/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs
+++ b/src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs
@@ -95,7 +95,7 @@ namespace Umbraco.Web.WebApi
/// Gets the Umbraco helper.
///
public UmbracoHelper Umbraco => _umbracoHelper
- ?? (_umbracoHelper = new UmbracoHelper(UmbracoContext, Services, ApplicationCache));
+ ?? (_umbracoHelper = new UmbracoHelper(UmbracoContext, Services));
///
/// Gets the web security helper.
diff --git a/src/Umbraco.Web/umbraco.presentation/item.cs b/src/Umbraco.Web/umbraco.presentation/item.cs
index d15d3d33c1..74cfb9bf25 100644
--- a/src/Umbraco.Web/umbraco.presentation/item.cs
+++ b/src/Umbraco.Web/umbraco.presentation/item.cs
@@ -60,7 +60,7 @@ namespace umbraco
if (_fieldName.StartsWith("#"))
{
- var umbHelper = new UmbracoHelper(Current.UmbracoContext, Current.Services, Current.ApplicationCache);
+ var umbHelper = new UmbracoHelper(Current.UmbracoContext, Current.Services);
_fieldContent = umbHelper.GetDictionaryValue(_fieldName.Substring(1, _fieldName.Length - 1));
}