Ignoring child actions in output cache

This commit is contained in:
Qingyu Zhou
2016-04-11 12:05:44 -07:00
committed by Sébastien Ros
parent fbd9e873c5
commit ef31bee59a

View File

@@ -178,14 +178,15 @@ namespace Orchard.OutputCache.Filters {
}
public void OnResultExecuted(ResultExecutedContext filterContext) {
// This filter is not reentrant (multiple executions within the same request are
// not supported) so child actions are ignored completely.
if (filterContext.IsChildAction)
return;
var captureHandlerIsAttached = false;
try {
// This filter is not reentrant (multiple executions within the same request are
// not supported) so child actions are ignored completely.
if (filterContext.IsChildAction || !_isCachingRequest)
if (!_isCachingRequest)
return;
Logger.Debug("Item '{0}' was rendered.", _cacheKey);