@@ -4,7 +4,7 @@ const log = require('../../components/logger');
44
55class Redis {
66 static client ;
7- static prefix = config . get ( 'environment ' ) ;
7+ static prefix = config . get ( 'redis:prefix ' ) ;
88
99 static async shutdown ( signal = 'quit' ) {
1010 log . info ( `Received ${ signal } , closing Redis connection` ) ;
@@ -47,7 +47,7 @@ class Redis {
4747 * @param {args } args - The rest of the command args
4848 */
4949 static async get ( key , ...args ) {
50- return Redis . client . get ( `${ Redis . prefix } : ${ key } ` , ...args ) ;
50+ return Redis . client . get ( `${ Redis . prefix } ${ key } ` , ...args ) ;
5151 }
5252
5353 /**
@@ -58,7 +58,7 @@ class Redis {
5858 * @param {args } args - The rest of the command args
5959 */
6060 static async set ( key , ...args ) {
61- return Redis . client . set ( `${ Redis . prefix } : ${ key } ` , ...args ) ;
61+ return Redis . client . set ( `${ Redis . prefix } ${ key } ` , ...args ) ;
6262 }
6363
6464 /**
@@ -69,7 +69,7 @@ class Redis {
6969 * @param {args } args - The rest of the command args
7070 */
7171 static async jsonGet ( key , ...args ) {
72- return Redis . client . json . get ( `${ Redis . prefix } : ${ key } ` , ...args ) ;
72+ return Redis . client . json . get ( `${ Redis . prefix } ${ key } ` , ...args ) ;
7373 }
7474
7575 /**
@@ -80,7 +80,7 @@ class Redis {
8080 * @param {args } args - The rest of the command args
8181 */
8282 static async jsonSet ( key , ...args ) {
83- return Redis . client . json . set ( `${ Redis . prefix } : ${ key } ` , ...args ) ;
83+ return Redis . client . json . set ( `${ Redis . prefix } ${ key } ` , ...args ) ;
8484 }
8585
8686 /**
@@ -91,7 +91,7 @@ class Redis {
9191 * @param {args } args - The rest of the command args
9292 */
9393 static async expire ( key , ...args ) {
94- return Redis . client . expire ( `${ Redis . prefix } : ${ key } ` , ...args ) ;
94+ return Redis . client . expire ( `${ Redis . prefix } ${ key } ` , ...args ) ;
9595 }
9696
9797 static async init ( ) {
0 commit comments