mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-28 08:53:33 -06:00
[chore/performance] Further reduce nil uncached queries (#3267)
* [chore/performance] Further reduce nil uncached queries * more checks
This commit is contained in:
parent
0560c5ce89
commit
7b7659f1fa
8 changed files with 62 additions and 13 deletions
|
|
@ -286,6 +286,12 @@ func (r *relationshipDB) DeleteAccountBlocks(ctx context.Context, accountID stri
|
|||
return err
|
||||
}
|
||||
|
||||
if len(blockIDs) == 0 {
|
||||
// Nothing
|
||||
// to delete.
|
||||
return nil
|
||||
}
|
||||
|
||||
defer func() {
|
||||
// Invalidate all account's incoming / outoing blocks on return.
|
||||
r.state.Caches.DB.Block.Invalidate("AccountID", accountID)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue