#20463: Fixing that background tasks accessing the HTTP cache failed (including e-mail template building).

Work Item 20463
This commit is contained in:
Lombiq
2014-01-30 22:38:37 +01:00
committed by Zoltán Lehóczky
parent 578bce12e2
commit 1719b9f469

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.Web;
using System.Web.Caching;
using System.Web.Instrumentation;
using System.Web.Mvc;
using System.Web.Routing;
@@ -87,6 +88,7 @@ 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);
@@ -109,6 +111,10 @@ namespace Orchard.Mvc {
public override PageInstrumentationService PageInstrumentation {
get { return new PageInstrumentationService(); }
}
public override Cache Cache {
get { return _cache; }
}
}
private class HttpResponsePlaceholder : HttpResponseBase {