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/move.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/move.go')
-rw-r--r-- | internal/db/bundb/move.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/db/bundb/move.go b/internal/db/bundb/move.go index 220874630..cccef5872 100644 --- a/internal/db/bundb/move.go +++ b/internal/db/bundb/move.go @@ -158,7 +158,7 @@ func (m *moveDB) getMove( dbQuery func(*gtsmodel.Move) error, keyParts ...any, ) (*gtsmodel.Move, error) { - move, err := m.state.Caches.GTS.Move.LoadOne(lookup, func() (*gtsmodel.Move, error) { + move, err := m.state.Caches.DB.Move.LoadOne(lookup, func() (*gtsmodel.Move, error) { var move gtsmodel.Move // Not cached! Perform database query. @@ -205,7 +205,7 @@ func (m *moveDB) PopulateMove(ctx context.Context, move *gtsmodel.Move) error { } func (m *moveDB) PutMove(ctx context.Context, move *gtsmodel.Move) error { - return m.state.Caches.GTS.Move.Store(move, func() error { + return m.state.Caches.DB.Move.Store(move, func() error { _, err := m.db. NewInsert(). Model(move). @@ -222,7 +222,7 @@ func (m *moveDB) UpdateMove(ctx context.Context, move *gtsmodel.Move, columns .. columns = append(columns, "updated_at") } - return m.state.Caches.GTS.Move.Store(move, func() error { + return m.state.Caches.DB.Move.Store(move, func() error { _, err := m.db. NewUpdate(). Model(move). @@ -234,7 +234,7 @@ func (m *moveDB) UpdateMove(ctx context.Context, move *gtsmodel.Move, columns .. } func (m *moveDB) DeleteMoveByID(ctx context.Context, id string) error { - defer m.state.Caches.GTS.Move.Invalidate("ID", id) + defer m.state.Caches.DB.Move.Invalidate("ID", id) _, err := m.db. NewDelete(). |