mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Changed default named cache expiration parameters.
Added support for per-item expiration time when not targeting Shared Caching.
This commit is contained in:

committed by
Sebastien Ros

parent
e973c490d4
commit
852128991e
@@ -6,7 +6,7 @@
|
||||
<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.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":60,"isExpirable":true,"type":2},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"OutputCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":5,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0},{"name":"DatabaseCache","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":5,"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" />
|
||||
|
@@ -63,7 +63,7 @@ namespace Orchard.Azure.Services.Caching.Output {
|
||||
if (_usingSharedCaching)
|
||||
_cache.Put(key, cacheItem);
|
||||
else
|
||||
_cache.Put(key, cacheItem, _region);
|
||||
_cache.Put(key, cacheItem, TimeSpan.FromSeconds(cacheItem.ValidFor), _region);
|
||||
}
|
||||
|
||||
public void Remove(string key) {
|
||||
|
Reference in New Issue
Block a user