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

@@ -17,8 +17,9 @@ import (
)
type Config struct {
SearchLimit uint64
Spooler auth_handler.Config
SearchLimit uint64
Spooler auth_handler.Config
AmountOfCachedAuthRequests uint16
}
type EsRepository struct {
@@ -39,7 +40,7 @@ func Start(ctx context.Context, conf Config, systemDefaults sd.SystemDefaults, c
auth_handler.Register(ctx, conf.Spooler, view, queries)
auth_handler.Start(ctx)
authReq := cache.Start(dbClient)
authReq := cache.Start(dbClient, conf.AmountOfCachedAuthRequests)
userRepo := eventstore.UserRepo{
SearchLimit: conf.SearchLimit,