diff options
author | 2024-07-24 09:41:43 +0100 | |
---|---|---|
committer | 2024-07-24 10:41:43 +0200 | |
commit | 63fc9b6c3e8a03010b662a4acad0eb6f04a11f04 (patch) | |
tree | f4bf28f78333365cbe9eeda19de4de566e475584 /internal/db/bundb/thread.go | |
parent | [feature] Allow user to set "bot" flag; show bot icon on profile (#3135) (diff) | |
download | gotosocial-63fc9b6c3e8a03010b662a4acad0eb6f04a11f04.tar.xz |
[chore] renames the `GTS` caches to `DB` caches (#3127)
* renames the `GTS` caches to `DB` caches, as it better references what they are
* change remaining Caches.GTS uses to Caches.DB
Diffstat (limited to 'internal/db/bundb/thread.go')
-rw-r--r-- | internal/db/bundb/thread.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/db/bundb/thread.go b/internal/db/bundb/thread.go index a75515062..2b44b6fa5 100644 --- a/internal/db/bundb/thread.go +++ b/internal/db/bundb/thread.go @@ -42,7 +42,7 @@ func (t *threadDB) PutThread(ctx context.Context, thread *gtsmodel.Thread) error } func (t *threadDB) GetThreadMute(ctx context.Context, id string) (*gtsmodel.ThreadMute, error) { - return t.state.Caches.GTS.ThreadMute.LoadOne("ID", func() (*gtsmodel.ThreadMute, error) { + return t.state.Caches.DB.ThreadMute.LoadOne("ID", func() (*gtsmodel.ThreadMute, error) { var threadMute gtsmodel.ThreadMute q := t.db. @@ -63,7 +63,7 @@ func (t *threadDB) GetThreadMutedByAccount( threadID string, accountID string, ) (*gtsmodel.ThreadMute, error) { - return t.state.Caches.GTS.ThreadMute.LoadOne("ThreadID,AccountID", func() (*gtsmodel.ThreadMute, error) { + return t.state.Caches.DB.ThreadMute.LoadOne("ThreadID,AccountID", func() (*gtsmodel.ThreadMute, error) { var threadMute gtsmodel.ThreadMute q := t.db. @@ -98,7 +98,7 @@ func (t *threadDB) IsThreadMutedByAccount( } func (t *threadDB) PutThreadMute(ctx context.Context, threadMute *gtsmodel.ThreadMute) error { - return t.state.Caches.GTS.ThreadMute.Store(threadMute, func() error { + return t.state.Caches.DB.ThreadMute.Store(threadMute, func() error { _, err := t.db.NewInsert().Model(threadMute).Exec(ctx) return err }) @@ -112,6 +112,6 @@ func (t *threadDB) DeleteThreadMute(ctx context.Context, id string) error { return err } - t.state.Caches.GTS.ThreadMute.Invalidate("ID", id) + t.state.Caches.DB.ThreadMute.Invalidate("ID", id) return nil } |