using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Scoping;
namespace Umbraco.Core.Cache
{
///
/// Represents a special policy that does not cache the result of GetAll.
///
/// The type of the entity.
/// The type of the identifier.
///
/// Overrides the default repository cache policy and does not writes the result of GetAll
/// to cache, but only the result of individual Gets. It does read the cache for GetAll, though.
/// Used by DictionaryRepository.
///
internal class SingleItemsOnlyRepositoryCachePolicy : DefaultRepositoryCachePolicy
where TEntity : class, IAggregateRoot
{
public SingleItemsOnlyRepositoryCachePolicy(IRuntimeCacheProvider cache, IScopeAccessor scopeAccessor, RepositoryCachePolicyOptions options)
: base(cache, scopeAccessor, options)
{ }
protected override void InsertEntities(TId[] ids, TEntity[] entities)
{
// nop
}
}
}