Fixes: U4-1970 v6 API - need to implement caching for templates since we're doing a db lookup on a front-end request. This is a temporary fix until we implement the ApplicationCache properly but it still works by utilizing the existing RuntimeCacheProvider singleton. I've tweaked this provider as well to ensure we use the HttpRuntime.Cache when it is available (during a web session). We don't want to have a seperate caching bucket so that IIS can manage cache memory properly. Have ensured that the template cache is cleared when templates are updated/removed.

This commit is contained in:
Shannon
2013-07-23 11:46:18 +10:00
parent 3da7682415
commit 8be54ba0cc
4 changed files with 96 additions and 17 deletions

View File

@@ -118,7 +118,7 @@ namespace Umbraco.Core.Persistence
public virtual ITemplateRepository CreateTemplateRepository(IDatabaseUnitOfWork uow)
{
return new TemplateRepository(uow, NullCacheProvider.Current);
return new TemplateRepository(uow, RuntimeCacheProvider.Current);
}
}
}