0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-06-01 03:59:03 +02:00
This commit is contained in:
Till 2024-05-16 17:56:16 +00:00 committed by GitHub
commit d09f8b8a61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,6 +46,10 @@ func (d *KeyDatabase) FetchKeys(
delete(requests, req)
}
}
// Don't bother hitting the DB if we got everything from cache.
if len(requests) == 0 {
return results, nil
}
fromDB, err := d.inner.FetchKeys(ctx, requests)
if err != nil {
return results, err