Browse Source

Remove `EntityCreatedEventData` condition to clear the cache.

pull/22720/head
maliming 1 year ago
committed by GitHub
parent
commit
33c33ee69e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheBase.cs

5
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Caching/EntityCacheBase.cs

@ -69,11 +69,6 @@ public abstract class EntityCacheBase<TEntity, TEntityCacheItem, TKey> :
public async Task HandleEventAsync(EntityChangedEventData<TEntity> eventData)
{
if (eventData is EntityCreatedEventData<TEntity>)
{
return;
}
/* Why we are using double remove:
* First Cache.RemoveAsync drops the cache item in a unit of work.
* Some other application / thread may read the value from database and put it to the cache again

Loading…
Cancel
Save