#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
This commit is contained in:
Lombiq
2014-02-01 23:38:48 +01:00
committed by Zoltán Lehóczky
parent 93941b00e3
commit 59c00c1342

View File

@@ -88,7 +88,6 @@ namespace Orchard.Mvc {
class HttpContextPlaceholder : HttpContextBase {
private readonly Lazy<string> _baseUrl;
private readonly IDictionary _items = new Dictionary<object, object>();
private readonly Cache _cache = new Cache();
public HttpContextPlaceholder(Func<string> baseUrl) {
_baseUrl = new Lazy<string>(baseUrl);
@@ -113,7 +112,7 @@ namespace Orchard.Mvc {
}
public override Cache Cache {
get { return _cache; }
get { return HttpRuntime.Cache; }
}
}