U4-7816 The IsolatedCache instance in the RepositoryFactory differs from the ApplicationContext singleton instance

This commit is contained in:
Shannon
2016-01-22 16:37:47 +01:00
parent 9f365727e0
commit f78a425985
4 changed files with 61 additions and 66 deletions

View File

@@ -39,6 +39,7 @@ using Umbraco.Web.Scheduling;
using Umbraco.Web.UI.JavaScript;
using Umbraco.Web.WebApi;
using umbraco.BusinessLogic;
using Umbraco.Core.Cache;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.UnitOfWork;
using Umbraco.Core.Publishing;
@@ -240,7 +241,19 @@ namespace Umbraco.Web
protected override CacheHelper CreateApplicationCache()
{
//create a web-based cache helper
return new CacheHelper();
var cacheHelper = new CacheHelper(
//we need to have the dep clone runtime cache provider to ensure
//all entities are cached properly (cloned in and cloned out)
new DeepCloneRuntimeCacheProvider(new HttpRuntimeCacheProvider(HttpRuntime.Cache)),
new StaticCacheProvider(),
//we have no request based cache when not running in web-based context
new NullCacheProvider(),
new IsolatedRuntimeCache(type =>
//we need to have the dep clone runtime cache provider to ensure
//all entities are cached properly (cloned in and cloned out)
new DeepCloneRuntimeCacheProvider(new ObjectCacheRuntimeCacheProvider())));
return cacheHelper;
}
/// <summary>