From f79d50b9b26590b6d2468aeb41f0846272e08d1a Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:22:21 +0100 Subject: [performance] cached oauth database types (#2838) * update token + client code to use struct caches * add code comments * slight tweak to default mem ratios * fix envparsing * add appropriate invalidate hooks * update the tokenstore sweeping function to rely on caches * update to use PutClient() * add ClientID to list of token struct indices --- internal/oauth/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/oauth/server.go') diff --git a/internal/oauth/server.go b/internal/oauth/server.go index 3e4519479..4f2ed509b 100644 --- a/internal/oauth/server.go +++ b/internal/oauth/server.go @@ -75,7 +75,7 @@ type s struct { } // New returns a new oauth server that implements the Server interface -func New(ctx context.Context, database db.Basic) Server { +func New(ctx context.Context, database db.DB) Server { ts := newTokenStore(ctx, database) cs := NewClientStore(database) -- cgit v1.2.3