Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Commit

Permalink
Added REDIS_NAMESPACE
Browse files Browse the repository at this point in the history
  • Loading branch information
baxy committed Feb 1, 2019
1 parent 7877420 commit f3b9c01
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ CASSANDRA_KEYSPACE=ethstats

REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_NAMESPACE=ethstats

DEEPSTREAM_HOST=localhost
DEEPSTREAM_PORT=6020
Expand Down
2 changes: 1 addition & 1 deletion app/lib/Cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default class Cache {
this.appConfig = diContainer.appConfig;
this.log = diContainer.logger;
this.redis = diContainer.redis;
this.namespace = 'netstats:cache';
this.namespace = `${this.appConfig.REDIS_NAMESPACE}:cache`;

this.cacheStorage = {};
}
Expand Down
2 changes: 1 addition & 1 deletion app/models/redis/AbstractModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class AbstractModel {
this.log = diContainer.logger;
this.prometheusMetrics = diContainer.prometheusMetrics;
this.redis = diContainer.redis;
this.namespace = 'netstats:db';
this.namespace = `${this.appConfig.REDIS_NAMESPACE}:db`;

this.returnObject = {
rows: [],
Expand Down

0 comments on commit f3b9c01

Please sign in to comment.