Browse Source
Remove `EntityCreatedEventData` condition to clear the cache.
pull/22720/head
maliming
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
0 additions and
5 deletions
-
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) |
|
|
public async Task HandleEventAsync(EntityChangedEventData<TEntity> eventData) |
|
|
{ |
|
|
{ |
|
|
if (eventData is EntityCreatedEventData<TEntity>) |
|
|
|
|
|
{ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Why we are using double remove: |
|
|
/* Why we are using double remove: |
|
|
* First Cache.RemoveAsync drops the cache item in a unit of work. |
|
|
* 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 |
|
|
* Some other application / thread may read the value from database and put it to the cache again |
|
|
|