From fd36b81f4b73a0e0dd6a9d4b3af6310896989854 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Tue, 29 Apr 2014 14:18:44 -0700 Subject: [PATCH] Disable ASP.NET output cache module --- .../Filters/OutputCacheFilter.cs | 16 ++++++++++------ src/Orchard.Web/Web.config | 2 ++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs b/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs index f33d89a6a..a0350437d 100644 --- a/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs +++ b/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs @@ -228,11 +228,6 @@ namespace Orchard.OutputCache.Filters { } } - // don't enable public caching for requests with query string - if (queryString.AllKeys.Any()) { - _maxAge = 0; - } - // compute the cache key _cacheKey = ComputeCacheKey(filterContext, parameters); @@ -489,6 +484,11 @@ namespace Orchard.OutputCache.Filters { response.Cache.SetMaxAge(maxAge); } + // keeping this examples for later usage + // response.Cache.VaryByParams["*"] = true; + // response.DisableUserCache(); + // response.DisableKernelCache(); + // an ETag is a string that uniquely identifies a specific version of a component. // we use the cache item to detect if it's a new one if (HttpRuntime.UsingIntegratedPipeline) { @@ -654,7 +654,11 @@ namespace Orchard.OutputCache.Filters { } protected override void Dispose(bool disposing) { - _mem.Dispose(); + if (disposing) { + _mem.Dispose(); + } + + base.Dispose(disposing); } } diff --git a/src/Orchard.Web/Web.config b/src/Orchard.Web/Web.config index 76cce76b9..0f76db44a 100644 --- a/src/Orchard.Web/Web.config +++ b/src/Orchard.Web/Web.config @@ -99,9 +99,11 @@ + +