diff options
author | 2022-11-20 16:33:49 +0000 | |
---|---|---|
committer | 2022-11-20 16:33:49 +0000 | |
commit | 5d55e8d920cd5969e5cff567ee88afb13f40a1b9 (patch) | |
tree | 7ad27cd4ae90a124a8d5ec04e7ff5ac9a1d27d26 /internal/processing/account/createblock.go | |
parent | [bugfix] fix possible infinite loop on federated AP profile delete (#1091) (diff) | |
download | gotosocial-5d55e8d920cd5969e5cff567ee88afb13f40a1b9.tar.xz |
[performance] add account block DB cache and remove block query joins (#1085)
* add account block DB cache and remove reliance on relational joins
* actually include cache key arguments...
* add a PutBlock() method which also updates the block cache, update tests accordingly
* use `PutBlock` instead of `Put(ctx, block)`
* add + use functions for deleting + invalidating blocks
Signed-off-by: kim <grufwub@gmail.com>
Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/processing/account/createblock.go')
-rw-r--r-- | internal/processing/account/createblock.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/processing/account/createblock.go b/internal/processing/account/createblock.go index dfe1475cb..5e5d9df46 100644 --- a/internal/processing/account/createblock.go +++ b/internal/processing/account/createblock.go @@ -65,7 +65,7 @@ func (p *processor) BlockCreate(ctx context.Context, requestingAccount *gtsmodel block.URI = uris.GenerateURIForBlock(requestingAccount.Username, newBlockID) // whack it in the database - if err := p.db.Put(ctx, block); err != nil { + if err := p.db.PutBlock(ctx, block); err != nil { return nil, gtserror.NewErrorInternalError(fmt.Errorf("BlockCreate: error creating block in db: %s", err)) } |