mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 18:07:31 +00:00
fix(login): correctly reload policies on auth request (#7839)
This commit is contained in:
14
internal/auth_request/repository/cache/cache.go
vendored
14
internal/auth_request/repository/cache/cache.go
vendored
@@ -24,16 +24,20 @@ type AuthRequestCache struct {
|
||||
}
|
||||
|
||||
func Start(dbClient *database.DB, amountOfCachedAuthRequests uint16) *AuthRequestCache {
|
||||
cache := &AuthRequestCache{
|
||||
client: dbClient,
|
||||
}
|
||||
idCache, err := lru.New[string, *domain.AuthRequest](int(amountOfCachedAuthRequests))
|
||||
logging.OnError(err).Info("auth request cache disabled")
|
||||
if err == nil {
|
||||
cache.idCache = idCache
|
||||
}
|
||||
codeCache, err := lru.New[string, *domain.AuthRequest](int(amountOfCachedAuthRequests))
|
||||
logging.OnError(err).Info("auth request cache disabled")
|
||||
|
||||
return &AuthRequestCache{
|
||||
client: dbClient,
|
||||
idCache: idCache,
|
||||
codeCache: codeCache,
|
||||
if err == nil {
|
||||
cache.codeCache = codeCache
|
||||
}
|
||||
return cache
|
||||
}
|
||||
|
||||
func (c *AuthRequestCache) Health(ctx context.Context) error {
|
||||
|
Reference in New Issue
Block a user