This commit is contained in:
Yassine 2025-06-26 08:09:36 +01:00 committed by GitHub
commit 9fe1f71e98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -137,7 +137,7 @@ export const config: Config = {
}, },
cache: { cache: {
type: process.env.REDIS_ENABLED === 'true' ? 'redis' : 'memory', type: process.env.REDIS_ENABLED === 'true' ? 'redis' : 'memory',
ttl: 60 * 1000, // Milliseconds ttl: parseInt(process.env.CACHE_TTL || '3600000'), // Defaulted to 1 hour
max: 100, // Maximum number of items in cache (defaults to 100) max: 100, // Maximum number of items in cache (defaults to 100)
host: process.env.REDIS_HOST || 'redis', host: process.env.REDIS_HOST || 'redis',
port: parseInt(process.env.REDIS_PORT || '6379'), port: parseInt(process.env.REDIS_PORT || '6379'),

View File

@ -66,3 +66,6 @@ APP_REDIS_PORT=9001
REDIS_ENABLED=false REDIS_ENABLED=false
REDIS_HOST=redis REDIS_HOST=redis
REDIS_PORT=6379 REDIS_PORT=6379
# Cache
CACHE_TTL=3600000