IEntityCache.cs 508 B

1234567891011121314151617181920212223
  1. using System.Threading.Tasks;
  2. using Abp.Runtime.Caching;
  3. namespace Abp.Domain.Entities.Caching
  4. {
  5. public interface IEntityCache<TCacheItem> : IEntityCache<TCacheItem, int>
  6. {
  7. }
  8. public interface IEntityCache<TCacheItem, TPrimaryKey>
  9. {
  10. TCacheItem this[TPrimaryKey id] { get; }
  11. string CacheName { get; }
  12. ITypedCache<TPrimaryKey, TCacheItem> InternalCache { get; }
  13. TCacheItem Get(TPrimaryKey id);
  14. Task<TCacheItem> GetAsync(TPrimaryKey id);
  15. }
  16. }