From 52ec22612593f2f36f66e3b3963d001c8f738a03 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Mon, 28 Apr 2014 13:20:42 -0700 Subject: [PATCH] Disable public caching when querystring is present --- .../Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs b/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs index dea8cec14..f33d89a6a 100644 --- a/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs +++ b/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs @@ -228,6 +228,11 @@ 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);