設定でPostgreSQLのクエリー結果のキャッシュを無効できるように (#5046)

This commit is contained in:
Satsuki Yanagi 2019-06-11 20:49:08 +09:00 committed by syuilo
parent 20630cb3a0
commit 1432a7193d
3 changed files with 6 additions and 2 deletions

View file

@ -96,7 +96,7 @@ export function initDb(justBorrow = false, sync = false, log = false) {
extra: config.db.extra,
synchronize: process.env.NODE_ENV === 'test' || sync,
dropSchema: process.env.NODE_ENV === 'test' && !justBorrow,
cache: {
cache: !config.db.disableCache ? {
type: 'redis',
options: {
host: config.redis.host,
@ -107,7 +107,7 @@ export function initDb(justBorrow = false, sync = false, log = false) {
db: config.redis.db || 0
}
}
},
} : false,
logging: log,
logger: log ? new MyCustomLogger() : undefined,
entities: [