Skip to content

Commit

Permalink
Don't return the count, so cache invalidation could happen (on a gene…
Browse files Browse the repository at this point in the history
…ric level)
  • Loading branch information
niemyjski committed Oct 2, 2024
1 parent f88defa commit 59df73b
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -746,9 +746,6 @@ public virtual async Task<long> 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
{
Expand Down Expand Up @@ -816,6 +813,7 @@ public virtual async Task<long> PatchAllAsync(IRepositoryQuery query, IPatchOper
{
if (IsCacheEnabled)
await InvalidateCacheByQueryAsync(query.As<T>());

await OnDocumentsChangedAsync(ChangeType.Saved, EmptyList, options).AnyContext();
await SendQueryNotificationsAsync(ChangeType.Saved, query, options).AnyContext();
}
Expand Down

0 comments on commit 59df73b

Please sign in to comment.