mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixing NRE in dashboard
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user