// Copyright (c) Umbraco. // See LICENSE for more details. using Umbraco.Cms.Core.Models.Entities; using Umbraco.Cms.Infrastructure.Scoping; namespace Umbraco.Cms.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, IEntity { public SingleItemsOnlyRepositoryCachePolicy(IAppPolicyCache cache, IScopeAccessor scopeAccessor, RepositoryCachePolicyOptions options) : base(cache, scopeAccessor, options) { } protected override void InsertEntities(TId[]? ids, TEntity[]? entities) { // nop } }