removes XmlCacheEnabled, ContinouslyUpdateXmlDiskCache, XmlContentCheckForDiskChanges from umb settings

This commit is contained in:
Shannon
2019-01-30 23:52:35 +11:00
parent a123bc7084
commit 3dce2c870e
8 changed files with 6 additions and 86 deletions

View File

@@ -22,15 +22,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
[ConfigurationProperty("notifications", IsRequired = true)]
internal NotificationsElement Notifications => (NotificationsElement) base["notifications"];
[ConfigurationProperty("XmlCacheEnabled")]
internal InnerTextConfigurationElement<bool> XmlCacheEnabled => GetOptionalTextElement("XmlCacheEnabled", true);
[ConfigurationProperty("ContinouslyUpdateXmlDiskCache")]
internal InnerTextConfigurationElement<bool> ContinouslyUpdateXmlDiskCache => GetOptionalTextElement("ContinouslyUpdateXmlDiskCache", true);
[ConfigurationProperty("XmlContentCheckForDiskChanges")]
internal InnerTextConfigurationElement<bool> XmlContentCheckForDiskChanges => GetOptionalTextElement("XmlContentCheckForDiskChanges", false);
[ConfigurationProperty("PropertyContextHelpOption")]
internal InnerTextConfigurationElement<string> PropertyContextHelpOption => GetOptionalTextElement("PropertyContextHelpOption", "text");
@@ -80,12 +71,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
bool IContentSection.ResolveUrlsFromTextString => ResolveUrlsFromTextString;
bool IContentSection.XmlCacheEnabled => XmlCacheEnabled;
bool IContentSection.ContinouslyUpdateXmlDiskCache => ContinouslyUpdateXmlDiskCache;
bool IContentSection.XmlContentCheckForDiskChanges => XmlContentCheckForDiskChanges;
string IContentSection.PropertyContextHelpOption => PropertyContextHelpOption;
bool IContentSection.ForceSafeAliases => ForceSafeAliases;

View File

@@ -17,12 +17,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
IEnumerable<IContentErrorPage> Error404Collection { get; }
bool XmlCacheEnabled { get; }
bool ContinouslyUpdateXmlDiskCache { get; }
bool XmlContentCheckForDiskChanges { get; }
string PropertyContextHelpOption { get; }
bool ForceSafeAliases { get; }

View File

@@ -35,11 +35,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
Assert.IsTrue(SettingsSection.Content.ImageAutoFillProperties.ElementAt(0).LengthFieldAlias == "umbracoBytes");
Assert.IsTrue(SettingsSection.Content.ImageAutoFillProperties.ElementAt(0).ExtensionFieldAlias == "umbracoExtension");
}
[Test]
public override void XmlContentCheckForDiskChanges()
{
Assert.IsTrue(SettingsSection.Content.XmlContentCheckForDiskChanges == false);
}
}
}

View File

@@ -85,21 +85,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
{
Assert.IsTrue(SettingsSection.Content.ForceSafeAliases);
}
[Test]
public void XmlCacheEnabled()
{
Assert.IsTrue(SettingsSection.Content.XmlCacheEnabled);
}
[Test]
public void ContinouslyUpdateXmlDiskCache()
{
Assert.IsTrue(SettingsSection.Content.ContinouslyUpdateXmlDiskCache);
}
[Test]
public virtual void XmlContentCheckForDiskChanges()
{
Assert.IsTrue(SettingsSection.Content.XmlContentCheckForDiskChanges);
}
[Test]
public void PropertyContextHelpOption()

View File

@@ -4,8 +4,6 @@
<imaging>
<!-- what file extension that should cause umbraco to create thumbnails -->
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
<!-- what attributes that are allowed in the editor on an img tag -->
<allowedAttributes>src,alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
<!-- automatically updates dimension, filesize and extension attributes on upload -->
<autoFillImageProperties>
<uploadField alias="umbracoFile">
@@ -22,18 +20,7 @@
</uploadField>
</autoFillImageProperties>
</imaging>
<scripteditor>
<!-- Path to script folder - no ending "/" -->
<scriptFolderPath>/scripts</scriptFolderPath>
<!-- what files can be opened/created in the script editor -->
<scriptFileTypes>js,xml</scriptFileTypes>
<!-- disable the codemirror editor and use a simple textarea instead -->
<scriptDisableEditor>false</scriptDisableEditor>
</scripteditor>
<!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext
should be set to false if the application pool's user account hasn't got readrights of the driveroot up to the /media directory -->
<UploadAllowDirectories>True</UploadAllowDirectories>
<errors>
<!-- the id of the page that should be shown if the page is not found -->
<!--<error404>
@@ -56,15 +43,6 @@
<!-- if true umbraco will ensure that no page under the same parent has an identical name -->
<ensureUniqueNaming>True</ensureUniqueNaming>
<!-- Enable / disable xml content cache -->
<XmlCacheEnabled>True</XmlCacheEnabled>
<!-- Update disk cache every time content has changed -->
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
<!-- Update in-memory cache if xml file is changed -->
<XmlContentCheckForDiskChanges>True</XmlContentCheckForDiskChanges>
<!-- Show property descriptions in editing view "icon|text|none" -->
<PropertyContextHelpOption>text</PropertyContextHelpOption>

View File

@@ -254,13 +254,13 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache
private readonly bool _xmlFileEnabled = true;
// whether the disk cache is enabled
private bool XmlFileEnabled => _xmlFileEnabled && Current.Configs.Settings().Content.XmlCacheEnabled;
private bool XmlFileEnabled => true;
// whether the disk cache is enabled and to update the disk cache when xml changes
private bool SyncToXmlFile => XmlFileEnabled && Current.Configs.Settings().Content.ContinouslyUpdateXmlDiskCache;
private bool SyncToXmlFile => true;
// whether the disk cache is enabled and to reload from disk cache if it changes
private bool SyncFromXmlFile => XmlFileEnabled && Current.Configs.Settings().Content.XmlContentCheckForDiskChanges;
private bool SyncFromXmlFile => false;
// whether _xml is immutable or not (achieved by cloning before changing anything)
private static bool XmlIsImmutable => Current.Configs.Settings().Content.CloneXmlContent;

View File

@@ -85,10 +85,6 @@ namespace Umbraco.Tests.Scoping
Assert.AreSame(umbracoContext, Umbraco.Web.Composing.Current.UmbracoContext);
Assert.AreSame(XmlStore, ((PublishedContentCache) umbracoContext.ContentCache).XmlStore);
// settings
var contentMock = Mock.Get(Factory.GetInstance<IUmbracoSettingsSection>().Content);
contentMock.Setup(x => x.XmlCacheEnabled).Returns(false);
// create document type, document
var contentType = new ContentType(-1) { Alias = "CustomDocument", Name = "Custom Document" };
Current.Services.ContentTypeService.Save(contentType);
@@ -203,11 +199,6 @@ namespace Umbraco.Tests.Scoping
Assert.AreSame(umbracoContext, Umbraco.Web.Composing.Current.UmbracoContext);
Assert.AreSame(XmlStore, ((PublishedContentCache)umbracoContext.ContentCache).XmlStore);
// settings
var settings = SettingsForTests.GenerateMockUmbracoSettings();
var contentMock = Mock.Get(Factory.GetInstance<IUmbracoSettingsSection>().Content);
contentMock.Setup(x => x.XmlCacheEnabled).Returns(false);
// create document type
var contentType = new ContentType(-1) { Alias = "CustomDocument", Name = "Custom Document" };
Current.Services.ContentTypeService.Save(contentType);

View File

@@ -41,17 +41,9 @@
<!-- Whether to force safe aliases (no spaces, no special characters) at businesslogic level on contenttypes and propertytypes -->
<!-- HIGHLY recommend to keep this to true to ensure valid and beautiful XML Schemas -->
<!-- fixme: remove this -->
<ForceSafeAliases>true</ForceSafeAliases>
<!-- Enable / disable xml content cache -->
<XmlCacheEnabled>True</XmlCacheEnabled>
<!-- Update disk cache every time content has changed -->
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
<!-- Update in-memory cache if xml file is changed -->
<XmlContentCheckForDiskChanges>False</XmlContentCheckForDiskChanges>
<!-- Show property descriptions in editing view "icon|text|none" -->
<PropertyContextHelpOption>text</PropertyContextHelpOption>