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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user