File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ INNLOGGINGSSTATUS_URL=http://localhost:8095/nav-dekoratoren-api/auth
11
11
REVALIDATOR_PROXY_ORIGIN=http://localhost:3002
12
12
XP_ORIGIN=http://localhost:8080
13
13
IS_FAILOVER_INSTANCE='false'
14
- BUILD_ID=prodLocal
15
14
RELEASE_TAG=prodLocal
16
15
ASSET_PREFIX=http://localhost:3000
17
16
TELEMETRY_URL=http://localhost:12347/collect
Original file line number Diff line number Diff line change @@ -23,18 +23,20 @@ type ConstructorProps = {
23
23
export class RedisCache {
24
24
private readonly client : ReturnType < typeof createClient > ;
25
25
private readonly ttl : number ;
26
- private readonly keyPrefix = process . env . BUILD_ID ;
26
+ private readonly keyPrefix : string ;
27
27
28
28
constructor ( { ttl } : ConstructorProps ) {
29
- const options = clientOptions [ process . env . ENV ] ;
29
+ const env = process . env . ENV ;
30
+ const options = clientOptions [ env ] ;
30
31
31
32
if ( ! options ) {
32
33
throw Error (
33
- `Redis client options were not defined for the current app environment ${ process . env . ENV } `
34
+ `Redis client options were not defined for the current app environment: ${ env } `
34
35
) ;
35
36
}
36
37
37
38
this . ttl = ttl ;
39
+ this . keyPrefix = process . env . BUILD_ID ;
38
40
39
41
this . client = createClient ( options )
40
42
. on ( 'connect' , ( ) => {
@@ -53,9 +55,7 @@ export class RedisCache {
53
55
console . error ( 'Redis client error: ' , err ) ;
54
56
} ) ;
55
57
56
- console . log (
57
- `Created redis client with url ${ process . env . REDIS_URI_PAGECACHE_DEV1 } `
58
- ) ;
58
+ console . log ( `Created redis client with url ${ options . url } ` ) ;
59
59
}
60
60
61
61
public async init ( ) {
You can’t perform that action at this time.
0 commit comments