Fixing NRE in dashboard

This commit is contained in:
Sebastien Ros
2014-05-16 12:08:45 -07:00
parent 3b7108469a
commit 96d2e2d3ba

View File

@@ -86,7 +86,6 @@ namespace Orchard.OutputCache.Filters {
private CapturingResponseFilter _filter;
private CacheItem _cacheItem;
public ILogger Logger { get; set; }
public void OnActionExecuting(ActionExecutingContext filterContext) {
@@ -291,12 +290,22 @@ namespace Orchard.OutputCache.Filters {
}
public void OnActionExecuted(ActionExecutedContext filterContext) {
// this means the cache module is not applied in this context
if (_workContext == null) {
return;
}
// handle redirections
_transformRedirect = TransformRedirect(filterContext);
}
public void OnResultExecuted(ResultExecutedContext filterContext) {
// this means the cache module is not applied in this context
if (_workContext == null) {
return;
}
var response = filterContext.HttpContext.Response;
if (!_cacheControlStrategy.IsCacheable(filterContext.Result, response)) {