U4-9322 - cont. implementing scoped repository caches

This commit is contained in:
Stephan
2017-01-20 12:08:55 +01:00
parent 434703f4ec
commit 848eaf5e27
23 changed files with 250 additions and 197 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using Umbraco.Core.Collections;
using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Scoping;
namespace Umbraco.Core.Cache
{
@@ -30,6 +31,11 @@ namespace Umbraco.Core.Cache
_expires = expires;
}
public override IRepositoryCachePolicy<TEntity, TId> Scoped(IRuntimeCacheProvider runtimeCache, IScope scope)
{
return new ScopedRepositoryCachePolicy<TEntity, TId>(this, runtimeCache, scope);
}
protected static readonly TId[] EmptyIds = new TId[0]; // const
protected string GetEntityTypeCacheKey()