From 59c00c1342843b39e5cb9412a5064c812eb07c20 Mon Sep 17 00:00:00 2001 From: Lombiq Date: Sat, 1 Feb 2014 23:38:48 +0100 Subject: [PATCH] #20463: Better fix for the issue that background tasks accessing the HTTP cache failed (including e-mail template building). The Cache object is not advised to be constructed by hand. Work Item 20463 --- src/Orchard/Mvc/MvcModule.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Orchard/Mvc/MvcModule.cs b/src/Orchard/Mvc/MvcModule.cs index 7814cd1e3..51cb37a04 100644 --- a/src/Orchard/Mvc/MvcModule.cs +++ b/src/Orchard/Mvc/MvcModule.cs @@ -88,7 +88,6 @@ namespace Orchard.Mvc { class HttpContextPlaceholder : HttpContextBase { private readonly Lazy _baseUrl; private readonly IDictionary _items = new Dictionary(); - private readonly Cache _cache = new Cache(); public HttpContextPlaceholder(Func baseUrl) { _baseUrl = new Lazy(baseUrl); @@ -113,7 +112,7 @@ namespace Orchard.Mvc { } public override Cache Cache { - get { return _cache; } + get { return HttpRuntime.Cache; } } }