Great AppCaches renaming

This commit is contained in:
Stephan
2019-01-17 11:01:23 +01:00
parent 67e4703821
commit 0bee01e0ee
108 changed files with 1538 additions and 1440 deletions

View File

@@ -13,16 +13,16 @@ namespace Umbraco.Core.Cache
internal abstract class RepositoryCachePolicyBase<TEntity, TId> : IRepositoryCachePolicy<TEntity, TId>
where TEntity : class, IEntity
{
private readonly IRuntimeCacheProvider _globalCache;
private readonly IAppPolicedCache _globalCache;
private readonly IScopeAccessor _scopeAccessor;
protected RepositoryCachePolicyBase(IRuntimeCacheProvider globalCache, IScopeAccessor scopeAccessor)
protected RepositoryCachePolicyBase(IAppPolicedCache globalCache, IScopeAccessor scopeAccessor)
{
_globalCache = globalCache ?? throw new ArgumentNullException(nameof(globalCache));
_scopeAccessor = scopeAccessor ?? throw new ArgumentNullException(nameof(scopeAccessor));
}
protected IRuntimeCacheProvider Cache
protected IAppPolicedCache Cache
{
get
{
@@ -32,9 +32,9 @@ namespace Umbraco.Core.Cache
case RepositoryCacheMode.Default:
return _globalCache;
case RepositoryCacheMode.Scoped:
return ambientScope.IsolatedRuntimeCache.GetOrCreateCache<TEntity>();
return ambientScope.IsolatedCaches.GetOrCreate<TEntity>();
case RepositoryCacheMode.None:
return NullCacheProvider.Instance;
return NoAppCache.Instance;
default:
throw new NotSupportedException($"Repository cache mode {ambientScope.RepositoryCacheMode} is not supported.");
}