using Umbraco.Core.Models.EntityBase; namespace Umbraco.Core.Cache { /// /// Creates cache policies /// /// /// internal class OnlySingleItemsRepositoryCachePolicyFactory : IRepositoryCachePolicyFactory where TEntity : class, IAggregateRoot { private readonly IRuntimeCacheProvider _runtimeCache; private readonly RepositoryCachePolicyOptions _options; public OnlySingleItemsRepositoryCachePolicyFactory(IRuntimeCacheProvider runtimeCache, RepositoryCachePolicyOptions options) { _runtimeCache = runtimeCache; _options = options; } public virtual IRepositoryCachePolicy CreatePolicy() { return new SingleItemsOnlyRepositoryCachePolicy(_runtimeCache, _options); } } }