mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-25 19:17:13 +08:00
Refactor cache context to support correct parallel execution
We need a new service, IParallelCacheContext, which allows tracking the current cache context across threads and tasks running in the thread pool. --HG-- branch : 1.x
This commit is contained in:
@@ -55,6 +55,7 @@ namespace Orchard.Core.Tests.Common.Providers {
|
||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
|
||||
builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
|
||||
builder.RegisterInstance(new Mock<IThemeManager>().Object);
|
||||
builder.RegisterInstance(new Mock<IOrchardServices>().Object);
|
||||
builder.RegisterInstance(new Mock<RequestContext>().Object);
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace Orchard.Core.Tests.Settings.Metadata {
|
||||
.As(typeof(IMapper<SettingsDictionary, XElement>));
|
||||
builder.RegisterType<Signals>().As<ISignals>();
|
||||
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
|
||||
builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
|
||||
|
||||
_container = builder.Build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user