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

@@ -80,7 +80,9 @@ namespace Umbraco.Core.Persistence
public virtual IAuditRepository CreateAuditRepository(IDatabaseUnitOfWork uow)
{
return new AuditRepository(uow, _cacheHelper, _logger, _sqlSyntax);
return new AuditRepository(uow,
CacheHelper.CreateDisabledCacheHelper(), //never cache
_logger, _sqlSyntax);
}
public virtual ITagRepository CreateTagRepository(IDatabaseUnitOfWork uow)