mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Allowing AliasUpdater to be disabled
AliasUpdater is only useful for farms
This commit is contained in:
@@ -1,100 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<HostComponents>
|
||||
<Components>
|
||||
<Components>
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.ExtensionMonitoringCoordinator">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable new extensions monitoring -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Environment.Extensions.ExtensionMonitoringCoordinator">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable new extensions monitoring -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy.PlacementFileParser">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable Placement files monitoring (Placement.info) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.DisplayManagement.Descriptors.ShapePlacementStrategy.PlacementFileParser">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable Placement files monitoring (Placement.info) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable template views monitoring (Views\*.cshtml) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable template views monitoring (Views\*.cshtml) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.Folders.ExtensionHarvester">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable extension folders monitoring (new files in modules and themes) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Environment.Extensions.Folders.ExtensionHarvester">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable extension folders monitoring (new files in modules and themes) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.Compilers.DefaultProjectFileParser">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable project files monitoring (/Modules/**/*.csproj) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Environment.Extensions.Compilers.DefaultProjectFileParser">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable project files monitoring (/Modules/**/*.csproj) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable source files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
<!-- Set Value="true" to completely disable the Dynamic Extension Loader -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable source files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
<!-- Set Value="true" to completely disable the Dynamic Extension Loader -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.Loaders.PrecompiledExtensionLoader">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable pre-compiled files monitoring (~/Modules/**/bin/*.dll) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Environment.Extensions.Loaders.PrecompiledExtensionLoader">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable pre-compiled files monitoring (~/Modules/**/bin/*.dll) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultDependenciesFolder">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable the dependencies folder monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultDependenciesFolder">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable the dependencies folder monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Localization.Services.DefaultLocalizedStringManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable localization files monitoring (*.po) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Localization.Services.DefaultLocalizedStringManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable localization files monitoring (*.po) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Caching.DefaultParallelCacheContext">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable parallel cache resolution -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Data.SessionConfigurationCache">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable session configuration cache (mappings.bin). Recommended when using multiple instances. -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.Descriptor.ShellDescriptorCache">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable shell descriptors cache (cache.dat). Recommended when using multiple instances. -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component Type="Orchard.Caching.DefaultParallelCacheContext">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable parallel cache resolution -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Data.SessionConfigurationCache">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable session configuration cache (mappings.bin). Recommended when using multiple instances. -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
</Components>
|
||||
<Component Type="Orchard.Alias.Implementation.Updater">
|
||||
<Properties>
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
</Components>
|
||||
</HostComponents>
|
||||
|
@@ -14,6 +14,8 @@ namespace Orchard.Alias.Implementation.Updater {
|
||||
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
public AliasHolderUpdater(IAliasHolder aliasHolder, IAliasStorage storage, IAliasUpdateCursor cursor) {
|
||||
_aliasHolder = aliasHolder;
|
||||
_storage = storage;
|
||||
@@ -45,7 +47,9 @@ namespace Orchard.Alias.Implementation.Updater {
|
||||
}
|
||||
|
||||
public void Sweep() {
|
||||
Refresh();
|
||||
if (!Disabled) {
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user