diff --git a/api/src/config/index.ts b/api/src/config/index.ts index 2d957807..dad24377 100644 --- a/api/src/config/index.ts +++ b/api/src/config/index.ts @@ -137,7 +137,7 @@ export const config: Config = { }, cache: { 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) host: process.env.REDIS_HOST || 'redis', port: parseInt(process.env.REDIS_PORT || '6379'), diff --git a/docker/.env.example b/docker/.env.example index d2941d2d..a9210dbb 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -66,3 +66,6 @@ APP_REDIS_PORT=9001 REDIS_ENABLED=false REDIS_HOST=redis REDIS_PORT=6379 + +# Cache +CACHE_TTL=3600000