using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; namespace Data.Abstractions { public interface IDataValueCache where TEntityType : class { void SetCacheItem(Func, CancellationToken, Task> itemGetter, string keyName, TimeSpan? expirationTime = null, bool autoRefresh = false); void SetCacheItem(Func, IEnumerable, CancellationToken, Task> itemGetter, string keyName, IEnumerable ids = null, TimeSpan? expirationTime = null, bool autoRefresh = false); Task GetCacheItem(string keyName, CancellationToken token = default); Task GetCacheItem(string keyName, IEnumerable ids = null, CancellationToken token = default); } }