diff --git a/src/Foundatio.Repositories.Elasticsearch/Repositories/ElasticRepositoryBase.cs b/src/Foundatio.Repositories.Elasticsearch/Repositories/ElasticRepositoryBase.cs index 19a9c3ec..1b6f23ef 100644 --- a/src/Foundatio.Repositories.Elasticsearch/Repositories/ElasticRepositoryBase.cs +++ b/src/Foundatio.Repositories.Elasticsearch/Repositories/ElasticRepositoryBase.cs @@ -746,9 +746,6 @@ public virtual async Task PatchAllAsync(IRepositoryQuery query, IPatchOper var delay = TimeSpan.FromSeconds(attempts <= 5 ? 1 : 5); await Task.Delay(delay).AnyContext(); } while (true); - - // TODO: Add cache invalidation. - return affectedRecords; } else { @@ -816,6 +813,7 @@ public virtual async Task PatchAllAsync(IRepositoryQuery query, IPatchOper { if (IsCacheEnabled) await InvalidateCacheByQueryAsync(query.As()); + await OnDocumentsChangedAsync(ChangeType.Saved, EmptyList, options).AnyContext(); await SendQueryNotificationsAsync(ChangeType.Saved, query, options).AnyContext(); }