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:
Renaud Paquay
2011-05-30 22:31:27 -07:00
parent 1c16b10aa0
commit 7122000ae0
31 changed files with 264 additions and 102 deletions

View File

@@ -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);

View File

@@ -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();