mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Enabled caching by default in Orchard.Azure.Web cloud service role.
Enabled session state cache provider by default in Orchard.Azure.Wew. Moved all string constants into Constants class. Got rid of unused implicit module feature of Orchard.Azure. Added missing settings banner. Split Orchard.StorageConnectionString role configuration setting up into two separate settings for Media and Settings respectively. Renamed startup task. Removed hard coded connection string and container name from AzureFileSystem, making it truly reusable.
This commit is contained in:
committed by
Sebastien Ros
parent
5872371189
commit
ca34a462b6
@@ -52,7 +52,7 @@
|
||||
<Folder Include="Profiles" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Orchard.Azure.WebContent\Bin\Startup\ConfigureIIS.cmd">
|
||||
<Content Include="Orchard.Azure.WebContent\Bin\Startup\SetIdleTimeout.cmd">
|
||||
<SubType>Content</SubType>
|
||||
</Content>
|
||||
<Content Include="Orchard.Azure.WebContent\diagnostics.wadcfg">
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
REM Check if this task is running on the compute emulator, if not then sets the Idle Timeout to zero
|
||||
|
||||
IF "%ComputeEmulatorRunning%" == "false" (
|
||||
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00
|
||||
)
|
||||
@@ -3,8 +3,13 @@
|
||||
<Role name="Orchard.Azure.Web">
|
||||
<Instances count="1" />
|
||||
<ConfigurationSettings>
|
||||
<Setting name="Orchard.StorageConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Orchard.Media.StorageConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Orchard.Settings.StorageConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="{"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"SessionStateCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"OutputCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"DatabaseCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel" value="1" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="30" />
|
||||
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="UseDevelopmentStorage=true" />
|
||||
</ConfigurationSettings>
|
||||
</Role>
|
||||
</ServiceConfiguration>
|
||||
@@ -10,25 +10,28 @@
|
||||
</Sites>
|
||||
<Imports>
|
||||
<Import moduleName="Diagnostics" />
|
||||
<Import moduleName="Caching" />
|
||||
</Imports>
|
||||
<ConfigurationSettings>
|
||||
<Setting name="Orchard.StorageConnectionString" />
|
||||
<Setting name="Orchard.Settings.StorageConnectionString" />
|
||||
<Setting name="Orchard.Media.StorageConnectionString" />
|
||||
</ConfigurationSettings>
|
||||
<Endpoints>
|
||||
<InputEndpoint name="HttpIn" protocol="http" port="80" />
|
||||
</Endpoints>
|
||||
<Startup>
|
||||
<Task commandLine="Startup\ConfigureIIS.cmd" executionContext="elevated" taskType="simple">
|
||||
<Task commandLine="Startup\SetIdleTimeout.cmd" executionContext="elevated" taskType="simple">
|
||||
<Environment>
|
||||
<!-- Create the environment variable that informs the startup task whether it is running
|
||||
in the Compute Emulator or in the cloud. "%ComputeEmulatorRunning%"=="true" when
|
||||
running in the Compute Emulator, "%ComputeEmulatorRunning%"=="false" when running
|
||||
in the cloud. -->
|
||||
in the compute emulator or in the cloud. -->
|
||||
<Variable name="ComputeEmulatorRunning">
|
||||
<RoleInstanceValue xpath="/RoleEnvironment/Deployment/@emulated" />
|
||||
</Variable>
|
||||
</Environment>
|
||||
</Task>
|
||||
</Startup>
|
||||
<LocalResources>
|
||||
<LocalStorage name="DiagnosticStore" sizeInMB="20000" cleanOnRoleRecycle="false" />
|
||||
</LocalResources>
|
||||
</WebRole>
|
||||
</ServiceDefinition>
|
||||
@@ -36,11 +36,11 @@
|
||||
To use the in-role flavor of Windows Azure Caching, set {CacheHostIdentifier} to be the cache cluster role name.
|
||||
To use the Windows Azure Caching Service, set {CacheHostIdentifier} to be the endpoint of the cache cluster.
|
||||
-->
|
||||
<!--<dataCacheClients>
|
||||
<dataCacheClients>
|
||||
<dataCacheClient name="DefaultCacheClient" useLegacyProtocol="false" connectionPool="true" maxConnectionsToServer="20">
|
||||
<autoDiscover isEnabled="true" identifier="{CacheHostIdentifier}" />
|
||||
</dataCacheClient>
|
||||
</dataCacheClients>-->
|
||||
</dataCacheClients>
|
||||
|
||||
<system.diagnostics>
|
||||
<trace>
|
||||
@@ -102,11 +102,11 @@
|
||||
</authentication>
|
||||
|
||||
<!-- Uncomment below to store session state in Windows Azure Cache (replace {CacheName} with name of your configured cache). -->
|
||||
<!--<sessionState mode="Custom" timeout="60" customProvider="CacheSessionStateProvider">
|
||||
<sessionState mode="Custom" timeout="60" customProvider="CacheSessionStateProvider">
|
||||
<providers>
|
||||
<add name="CacheSessionStateProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="{CacheName}" dataCacheClientName="DefaultCacheClient" applicationName="Orchard" />
|
||||
</providers>
|
||||
</sessionState>-->
|
||||
</sessionState>
|
||||
|
||||
<customErrors mode="RemoteOnly" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user