From ea7d353be7830d4e80d0dbf5db03aecfb1a24e3b Mon Sep 17 00:00:00 2001 From: cmsassot Date: Thu, 14 Dec 2023 11:14:53 +0100 Subject: [PATCH] feat(redis): add env var HYDRA_SQL_REDIS_PREFIX/HYDRA_SQL_REDIS_TTL --- .env | 3 +++ config/packages/framework.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env b/.env index c4046f5..01bf543 100644 --- a/.env +++ b/.env @@ -41,3 +41,6 @@ LOCK_DSN=flock SENTRY_DSN= ###< sentry/sentry-symfony ### REDIS_DSN=redis://redis:6379 + +HYDRA_SQL_REDIS_PREFIX=mse +HYDRA_SQL_REDIS_TTL=3600 diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index 68da994..f411575 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -12,7 +12,7 @@ framework: # Enables session support. Note that the session will ONLY be started if you read or write from it. # Remove or comment this section to explicitly disable session support. session: - handler_id: '%env(REDIS_DSN)%' + handler_id: '%env(REDIS_DSN)%?prefix=%env(string:HYDRA_SQL_REDIS_PREFIX)%&ttl=%env(int:HYDRA_SQL_REDIS_TTL)%' cookie_secure: auto cookie_samesite: lax storage_factory_id: session.storage.factory.native