perf: cache auth request in memory (#7824)

* perf: cache auth request in memory
This commit is contained in:
Silvan
2024-04-23 13:23:50 +02:00
committed by GitHub
parent 9fa90e0757
commit 25030c69b9
10 changed files with 165 additions and 51 deletions

View File

@@ -40,7 +40,7 @@ func (db *DB) Query(scan func(*sql.Rows) error, query string, args ...any) error
func (db *DB) QueryContext(ctx context.Context, scan func(rows *sql.Rows) error, query string, args ...any) (err error) {
ctx, spanBeginTx := tracing.NewNamedSpan(ctx, "db.BeginTx")
tx, err := db.BeginTx(ctx, &sql.TxOptions{ReadOnly: true})
tx, err := db.BeginTx(ctx, &sql.TxOptions{ReadOnly: true, Isolation: sql.LevelReadCommitted})
spanBeginTx.EndWithError(err)
if err != nil {
return err