Move UmbracoConfig singleton to Current
This commit is contained in:
@@ -110,7 +110,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
|
||||
_mediaRepository = mediaRepository;
|
||||
_memberRepository = memberRepository;
|
||||
_xmlFileEnabled = false;
|
||||
_xmlFileName = IOHelper.MapPath(SystemFiles.GetContentCacheXml(UmbracoConfig.For.GlobalSettings()));
|
||||
_xmlFileName = IOHelper.MapPath(SystemFiles.GetContentCacheXml(Current.Config.Global()));
|
||||
// do not plug events, we may not have what it takes to handle them
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
|
||||
_memberRepository = memberRepository;
|
||||
GetXmlDocument = getXmlDocument ?? throw new ArgumentNullException(nameof(getXmlDocument));
|
||||
_xmlFileEnabled = false;
|
||||
_xmlFileName = IOHelper.MapPath(SystemFiles.GetContentCacheXml(UmbracoConfig.For.GlobalSettings()));
|
||||
_xmlFileName = IOHelper.MapPath(SystemFiles.GetContentCacheXml(Current.Config.Global()));
|
||||
// do not plug events, we may not have what it takes to handle them
|
||||
}
|
||||
|
||||
@@ -253,16 +253,16 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
|
||||
private readonly bool _xmlFileEnabled = true;
|
||||
|
||||
// whether the disk cache is enabled
|
||||
private bool XmlFileEnabled => _xmlFileEnabled && UmbracoConfig.For.UmbracoSettings().Content.XmlCacheEnabled;
|
||||
private bool XmlFileEnabled => _xmlFileEnabled && Current.Config.Umbraco().Content.XmlCacheEnabled;
|
||||
|
||||
// whether the disk cache is enabled and to update the disk cache when xml changes
|
||||
private bool SyncToXmlFile => XmlFileEnabled && UmbracoConfig.For.UmbracoSettings().Content.ContinouslyUpdateXmlDiskCache;
|
||||
private bool SyncToXmlFile => XmlFileEnabled && Current.Config.Umbraco().Content.ContinouslyUpdateXmlDiskCache;
|
||||
|
||||
// whether the disk cache is enabled and to reload from disk cache if it changes
|
||||
private bool SyncFromXmlFile => XmlFileEnabled && UmbracoConfig.For.UmbracoSettings().Content.XmlContentCheckForDiskChanges;
|
||||
private bool SyncFromXmlFile => XmlFileEnabled && Current.Config.Umbraco().Content.XmlContentCheckForDiskChanges;
|
||||
|
||||
// whether _xml is immutable or not (achieved by cloning before changing anything)
|
||||
private static bool XmlIsImmutable => UmbracoConfig.For.UmbracoSettings().Content.CloneXmlContent;
|
||||
private static bool XmlIsImmutable => Current.Config.Umbraco().Content.CloneXmlContent;
|
||||
|
||||
// whether to keep version of everything (incl. medias & members) in cmsPreviewXml
|
||||
// for audit purposes - false by default, not in umbracoSettings.config
|
||||
@@ -1241,7 +1241,7 @@ ORDER BY umbracoNode.level, umbracoNode.sortOrder";
|
||||
// the types will be reloaded if/when needed
|
||||
foreach (var payload in payloads)
|
||||
_contentTypeCache.ClearDataType(payload.Id);
|
||||
|
||||
|
||||
foreach (var payload in payloads)
|
||||
Current.Logger.Debug<XmlStore>("Notified {RemovedStatus} for data type {payload.Id}",
|
||||
payload.Removed ? "Removed" : "Refreshed",
|
||||
|
||||
Reference in New Issue
Block a user