summaryrefslogtreecommitdiff
path: root/internal/db/bundb/tombstone.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-07-24 09:41:43 +0100
committerLibravatar GitHub <noreply@github.com>2024-07-24 10:41:43 +0200
commit63fc9b6c3e8a03010b662a4acad0eb6f04a11f04 (patch)
treef4bf28f78333365cbe9eeda19de4de566e475584 /internal/db/bundb/tombstone.go
parent[feature] Allow user to set "bot" flag; show bot icon on profile (#3135) (diff)
downloadgotosocial-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/tombstone.go')
-rw-r--r--internal/db/bundb/tombstone.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/db/bundb/tombstone.go b/internal/db/bundb/tombstone.go
index 64169213e..bff4ad839 100644
--- a/internal/db/bundb/tombstone.go
+++ b/internal/db/bundb/tombstone.go
@@ -32,7 +32,7 @@ type tombstoneDB struct {
}
func (t *tombstoneDB) GetTombstoneByURI(ctx context.Context, uri string) (*gtsmodel.Tombstone, error) {
- return t.state.Caches.GTS.Tombstone.LoadOne("URI", func() (*gtsmodel.Tombstone, error) {
+ return t.state.Caches.DB.Tombstone.LoadOne("URI", func() (*gtsmodel.Tombstone, error) {
var tomb gtsmodel.Tombstone
q := t.db.
@@ -57,7 +57,7 @@ func (t *tombstoneDB) TombstoneExistsWithURI(ctx context.Context, uri string) (b
}
func (t *tombstoneDB) PutTombstone(ctx context.Context, tombstone *gtsmodel.Tombstone) error {
- return t.state.Caches.GTS.Tombstone.Store(tombstone, func() error {
+ return t.state.Caches.DB.Tombstone.Store(tombstone, func() error {
_, err := t.db.
NewInsert().
Model(tombstone).
@@ -67,7 +67,7 @@ func (t *tombstoneDB) PutTombstone(ctx context.Context, tombstone *gtsmodel.Tomb
}
func (t *tombstoneDB) DeleteTombstone(ctx context.Context, id string) error {
- defer t.state.Caches.GTS.Tombstone.Invalidate("ID", id)
+ defer t.state.Caches.DB.Tombstone.Invalidate("ID", id)
// Delete tombstone from DB.
_, err := t.db.NewDelete().