|
|
@ -14,7 +14,10 @@ export default class RedisCacheMgr extends CacheMgr { |
|
|
|
this.client = new Redis(config); |
|
|
|
this.client = new Redis(config); |
|
|
|
|
|
|
|
|
|
|
|
// avoid flushing db in worker container
|
|
|
|
// avoid flushing db in worker container
|
|
|
|
if (process.env.NC_WORKER_CONTAINER !== 'true' && process.env.NC_CLOUD !== 'true') { |
|
|
|
if ( |
|
|
|
|
|
|
|
process.env.NC_WORKER_CONTAINER !== 'true' && |
|
|
|
|
|
|
|
process.env.NC_CLOUD !== 'true' |
|
|
|
|
|
|
|
) { |
|
|
|
// flush the existing db with selected key (Default: 0)
|
|
|
|
// flush the existing db with selected key (Default: 0)
|
|
|
|
this.client.flushdb(); |
|
|
|
this.client.flushdb(); |
|
|
|
} |
|
|
|
} |
|
|
|