mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#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:
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user