--HG--
branch : dev
This commit is contained in:
Bertrand Le Roy
2010-07-28 18:17:42 -07:00
3 changed files with 20 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
<MSDeploy.iisApp>
<iisapp path="Orchard" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated"/>
<iisapp path="Orchard" managedRuntimeVersion="v4.0" />
<setAcl path="Orchard/App_Data" setAclAccess="Modify" />
<setAcl path="Orchard/Media" setAclAccess="Modify" />
</MSDeploy.iisApp>

View File

@@ -21,6 +21,7 @@ namespace Orchard.Environment {
private readonly ControllerBuilder _controllerBuilder;
private readonly IShellSettingsManager _shellSettingsManager;
private readonly IShellContextFactory _shellContextFactory;
private readonly IShellDescriptorCache _shellDescriptorCache;
private readonly IRunningShellTable _runningShellTable;
private readonly IProcessingEngine _processingEngine;
private readonly IExtensionLoaderCoordinator _extensionLoaderCoordinator;
@@ -32,6 +33,7 @@ namespace Orchard.Environment {
public DefaultOrchardHost(
IShellSettingsManager shellSettingsManager,
IShellContextFactory shellContextFactory,
IShellDescriptorCache shellDescriptorCache,
IRunningShellTable runningShellTable,
IProcessingEngine processingEngine,
IExtensionLoaderCoordinator extensionLoaderCoordinator,
@@ -40,6 +42,7 @@ namespace Orchard.Environment {
_shellSettingsManager = shellSettingsManager;
_shellContextFactory = shellContextFactory;
_shellDescriptorCache = shellDescriptorCache;
_runningShellTable = runningShellTable;
_processingEngine = processingEngine;
_extensionLoaderCoordinator = extensionLoaderCoordinator;
@@ -149,6 +152,7 @@ namespace Orchard.Environment {
_cacheManager.Get("OrchardHost_Extensions",
ctx => {
_extensionLoaderCoordinator.MonitorExtensions(ctx.Monitor);
_shellDescriptorCache.Monitor(ctx.Monitor);
_current = null;
return "";
});

View File

@@ -2,6 +2,7 @@
using System.IO;
using System.Runtime.Serialization;
using System.Xml;
using Orchard.Caching;
using Orchard.Environment.Descriptor.Models;
using Orchard.FileSystems.AppData;
using Orchard.Localization;
@@ -26,6 +27,11 @@ namespace Orchard.Environment.Descriptor {
/// Loss of storage is expected.
/// </summary>
void Store(string shellName, ShellDescriptor descriptor);
/// <summary>
/// Monitor changes on the persistent storage.
/// </summary>
void Monitor(Action<IVolatileToken> monitor);
}
public class ShellDescriptorCache : IShellDescriptorCache {
@@ -98,6 +104,10 @@ namespace Orchard.Environment.Descriptor {
_appDataFolder.CreateFile(DescriptorCacheFileName, saveWriter.ToString());
}
public void Monitor(Action<IVolatileToken> monitor) {
monitor(_appDataFolder.WhenPathChanges(DescriptorCacheFileName));
}
#endregion
private void VerifyCacheFile() {