Thomas Kaul
5 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
1 deletions
-
apps/api/src/app/redis-cache/redis-cache.module.ts
|
|
@ -15,10 +15,14 @@ import { RedisCacheService } from './redis-cache.service'; |
|
|
|
imports: [ConfigurationModule], |
|
|
|
inject: [ConfigurationService], |
|
|
|
useFactory: async (configurationService: ConfigurationService) => { |
|
|
|
const redisPassword = encodeURIComponent( |
|
|
|
configurationService.get('REDIS_PASSWORD') |
|
|
|
); |
|
|
|
|
|
|
|
return <RedisClientOptions>{ |
|
|
|
store: redisStore, |
|
|
|
ttl: configurationService.get('CACHE_TTL'), |
|
|
|
url: `redis://:${configurationService.get('REDIS_PASSWORD')}@${configurationService.get('REDIS_HOST')}:${configurationService.get('REDIS_PORT')}/${configurationService.get('REDIS_DB')}` |
|
|
|
url: `redis://${redisPassword ? `:${redisPassword}` : ''}@${configurationService.get('REDIS_HOST')}:${configurationService.get('REDIS_PORT')}/${configurationService.get('REDIS_DB')}` |
|
|
|
}; |
|
|
|
} |
|
|
|
}), |
|
|
|