summaryrefslogtreecommitdiff
path: root/internal/db/bundb/report.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/bundb/report.go')
-rw-r--r--internal/db/bundb/report.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/db/bundb/report.go b/internal/db/bundb/report.go
index f99f0b5cc..d2096a78a 100644
--- a/internal/db/bundb/report.go
+++ b/internal/db/bundb/report.go
@@ -147,7 +147,7 @@ func (r *reportDB) GetReports(ctx context.Context, resolved *bool, accountID str
func (r *reportDB) getReport(ctx context.Context, lookup string, dbQuery func(*gtsmodel.Report) error, keyParts ...any) (*gtsmodel.Report, error) {
// Fetch report from database cache with loader callback
- report, err := r.state.Caches.GTS.Report.LoadOne(lookup, func() (*gtsmodel.Report, error) {
+ report, err := r.state.Caches.DB.Report.LoadOne(lookup, func() (*gtsmodel.Report, error) {
var report gtsmodel.Report
// Not cached! Perform database query
@@ -242,7 +242,7 @@ func (r *reportDB) PopulateReport(ctx context.Context, report *gtsmodel.Report)
}
func (r *reportDB) PutReport(ctx context.Context, report *gtsmodel.Report) error {
- return r.state.Caches.GTS.Report.Store(report, func() error {
+ return r.state.Caches.DB.Report.Store(report, func() error {
_, err := r.db.NewInsert().Model(report).Exec(ctx)
return err
})
@@ -264,12 +264,12 @@ func (r *reportDB) UpdateReport(ctx context.Context, report *gtsmodel.Report, co
return nil, err
}
- r.state.Caches.GTS.Report.Invalidate("ID", report.ID)
+ r.state.Caches.DB.Report.Invalidate("ID", report.ID)
return report, nil
}
func (r *reportDB) DeleteReportByID(ctx context.Context, id string) error {
- defer r.state.Caches.GTS.Report.Invalidate("ID", id)
+ defer r.state.Caches.DB.Report.Invalidate("ID", id)
// Load status into cache before attempting a delete,
// as we need it cached in order to trigger the invalidate