private Task OnDocumentsAdded(object sender, DocumentsEventArgs <T> documents) { if (!IsCacheEnabled) { return(Task.CompletedTask); } return(InvalidateCachedQueriesAsync(documents.Documents, documents.Options)); }
private async Task OnDocumentsAdded(object sender, DocumentsEventArgs <Project> documents) { if (!IsCacheEnabled) { return; } await InvalidateCountCacheAsync(documents.Documents.Select(d => d.OrganizationId)).AnyContext(); }
private Task OnDocumentsAdded(object sender, DocumentsEventArgs<User> documents) { if (!IsCacheEnabled) return Task.CompletedTask; return InvalidateCachedQueriesAsync(documents.Documents, documents.Options); }