IMplements RepositoryCacheOptions to be able to have a more granular approach to how the base repository caches entities. Allows for a zero count caching as well which by default currently will be false since that's how it's inadvertently been until now, however have enabled a zero count cache for public access since this is queried very heavily on GetAll. Going to look at what other repositories do the same - Templates definitely does.

This commit is contained in:
Shannon
2015-01-29 15:39:41 +11:00
parent 1b161c8dbe
commit 47ec2572f5
9 changed files with 101 additions and 44 deletions

View File

@@ -55,9 +55,6 @@ namespace Umbraco.Web.Cache
ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheItem(
string.Format("{0}{1}", CacheKeys.TemplateFrontEndCacheKey, id));
ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheItem(
string.Format("{0}{1}", CacheKeys.TemplateBusinessLogicCacheKey, id));
//need to clear the runtime cache for template instances
//NOTE: This is temp until we implement the correct ApplicationCache and then we can remove the RuntimeCache, etc...
ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheObjectTypes<ITemplate>();