UnitOfWork RIP, troubleshoot and fix, tests

This commit is contained in:
Stephan
2017-12-15 16:29:14 +01:00
parent 0ab2f6cc9f
commit bbff74fa51
79 changed files with 501 additions and 588 deletions

View File

@@ -23,17 +23,12 @@ namespace Umbraco.Core.Cache
private static readonly TEntity[] EmptyEntities = new TEntity[0]; // const
private readonly RepositoryCachePolicyOptions _options;
public DefaultRepositoryCachePolicy(IRuntimeCacheProvider cache, RepositoryCachePolicyOptions options)
: base(cache)
public DefaultRepositoryCachePolicy(IRuntimeCacheProvider cache, IScopeAccessor scopeAccessor, RepositoryCachePolicyOptions options)
: base(cache, scopeAccessor)
{
_options = options ?? throw new ArgumentNullException(nameof(options));
}
public override IRepositoryCachePolicy<TEntity, TId> Scoped(IRuntimeCacheProvider runtimeCache, IScope scope)
{
return new ScopedRepositoryCachePolicy<TEntity, TId>(this, runtimeCache, scope);
}
protected string GetEntityCacheKey(object id)
{
if (id == null) throw new ArgumentNullException(nameof(id));