Fixes up dictionary and language repositories to have underlying simple get repositories since they support getting by id, unique id and string variations but we want to have native repository enabled caching for these items so these get methods now use private repositories based on these keys. Adds more tests, removes N+1 queries for languages and dictionary items. Removes RuntimeCacheProvider, we only want one type of cache, this simplifies things a lot.
This commit is contained in:
@@ -34,8 +34,8 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
private UserRepository CreateRepository(IDatabaseUnitOfWork unitOfWork, out UserTypeRepository userTypeRepository)
|
||||
{
|
||||
userTypeRepository = new UserTypeRepository(unitOfWork, NullCacheProvider.Current, Mock.Of<ILogger>());
|
||||
var repository = new UserRepository(unitOfWork, NullCacheProvider.Current, Mock.Of<ILogger>(), userTypeRepository, CacheHelper.CreateDisabledCacheHelper());
|
||||
userTypeRepository = new UserTypeRepository(unitOfWork, CacheHelper.CreateDisabledCacheHelper(), Mock.Of<ILogger>());
|
||||
var repository = new UserRepository(unitOfWork, CacheHelper.CreateDisabledCacheHelper(), Mock.Of<ILogger>(), userTypeRepository, CacheHelper.CreateDisabledCacheHelper());
|
||||
return repository;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user