diff options
| author | 2025-07-01 16:00:04 +0200 | |
|---|---|---|
| committer | 2025-07-01 16:00:04 +0200 | |
| commit | 4f2aa792b33fdd5fb4b22dec813b3668d7190522 (patch) | |
| tree | 1148a9322d04bf43c1c159df3079fb1790c5c154 /internal/processing/conversations | |
| parent | [chore] update go dependencies (#4304) (diff) | |
| download | gotosocial-4f2aa792b33fdd5fb4b22dec813b3668d7190522.tar.xz | |
[performance] add statusfilter cache to cache calculated status filtering results (#4303)
this adds another 'filter' type cache, similar to the visibility and mute caches, to cache the results of status filtering checks. for the moment this keeps all the check calls themselves within the frontend typeconversion code, but i may move this out of the typeconverter in a future PR (also removing the ErrHideStatus means of propagating a hidden status).
also tweaks some of the cache invalidation hooks to not make unnecessary calls.
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4303
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/processing/conversations')
| -rw-r--r-- | internal/processing/conversations/update.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/processing/conversations/update.go b/internal/processing/conversations/update.go index e4024a24a..cf81d6906 100644 --- a/internal/processing/conversations/update.go +++ b/internal/processing/conversations/update.go @@ -23,11 +23,11 @@ import ( apimodel "code.superseriousbusiness.org/gotosocial/internal/api/model" "code.superseriousbusiness.org/gotosocial/internal/db" - statusfilter "code.superseriousbusiness.org/gotosocial/internal/filter/status" "code.superseriousbusiness.org/gotosocial/internal/gtserror" "code.superseriousbusiness.org/gotosocial/internal/gtsmodel" "code.superseriousbusiness.org/gotosocial/internal/id" "code.superseriousbusiness.org/gotosocial/internal/log" + "code.superseriousbusiness.org/gotosocial/internal/typeutils" "code.superseriousbusiness.org/gotosocial/internal/util" ) @@ -167,7 +167,7 @@ func (p *Processor) UpdateConversationsForStatus(ctx context.Context, status *gt if err != nil { // If the conversation's last status matched a hide filter, skip it. // If there was another kind of error, log that and skip it anyway. - if !errors.Is(err, statusfilter.ErrHideStatus) { + if !errors.Is(err, typeutils.ErrHideStatus) { log.Errorf(ctx, "error converting conversation %s to API representation for account %s: %v", status.ID, |
