#21277: Fixed possible cache key collisions in output cache.

The cache keys of action method parameters are now prefixed with "PARAM:" to avoid collisions with built-in keys such as "theme". Similar to the "HEADER:" prefixing done for headers.

Work Item: 21277
This commit is contained in:
Daniel Stolt
2015-03-21 14:32:23 +01:00
parent ca6eee88db
commit bdc64df4eb

View File

@@ -334,7 +334,7 @@ namespace Orchard.OutputCache.Filters {
// Vary by action parameters.
foreach (var p in filterContext.ActionParameters)
result.Add(p.Key, p.Value);
result.Add("PARAM:" + p.Key, p.Value);
// Vary by theme.
result.Add("theme", _themeManager.GetRequestTheme(filterContext.RequestContext).Id.ToLowerInvariant());