Class EntityCacheBase<TEntity, TEntityCacheItem, TKey>
Inheritance
object
EntityCacheBase<TEntity, TEntityCacheItem, TKey>
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Assembly: Volo.Abp.Ddd.Domain.dll
Syntax
public abstract class EntityCacheBase<TEntity, TEntityCacheItem, TKey> : IEntityCache<TEntityCacheItem, TKey>, ILocalEventHandler<EntityChangedEventData<TEntity>>, IEventHandler where TEntity : Entity<TKey> where TEntityCacheItem : class
Type Parameters
| Name |
Description |
| TEntity |
|
| TEntityCacheItem |
|
| TKey |
|
Constructors
EntityCacheBase(IReadOnlyRepository<TEntity, TKey>, IDistributedCache<TEntityCacheItem, TKey>, IUnitOfWorkManager)
Declaration
protected EntityCacheBase(IReadOnlyRepository<TEntity, TKey> repository, IDistributedCache<TEntityCacheItem, TKey> cache, IUnitOfWorkManager unitOfWorkManager)
Parameters
Properties
Cache
Declaration
protected IDistributedCache<TEntityCacheItem, TKey> Cache { get; }
Property Value
Repository
Declaration
protected IReadOnlyRepository<TEntity, TKey> Repository { get; }
Property Value
UnitOfWorkManager
Declaration
protected IUnitOfWorkManager UnitOfWorkManager { get; }
Property Value
Methods
FindAsync(TKey)
Declaration
public virtual Task<TEntityCacheItem> FindAsync(TKey id)
Parameters
| Type |
Name |
Description |
| TKey |
id |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><TEntityCacheItem> |
|
GetAsync(TKey)
Declaration
public virtual Task<TEntityCacheItem> GetAsync(TKey id)
Parameters
| Type |
Name |
Description |
| TKey |
id |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<TResult><TEntityCacheItem> |
|
HandleEventAsync(EntityChangedEventData<TEntity>)
Declaration
public Task HandleEventAsync(EntityChangedEventData<TEntity> eventData)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
MapToCacheItem(TEntity)
Declaration
protected abstract TEntityCacheItem MapToCacheItem(TEntity entity)
Parameters
| Type |
Name |
Description |
| TEntity |
entity |
|
Returns
| Type |
Description |
| TEntityCacheItem |
|
Implements
Extension Methods