Enable query result cache for meta / stats / hashtags trend (#4978)

This commit is contained in:
Satsuki Yanagi
2019-05-25 08:35:16 +09:00
committed by syuilo
parent 3ea7a49c1c
commit 7e7f94d685
4 changed files with 20 additions and 5 deletions

View File

@ -96,6 +96,18 @@ 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: {
type: 'redis',
options: {
host: config.redis.host,
port: config.redis.port,
options:{
auth_pass: config.redis.pass,
prefix: config.redis.prefix,
db: config.redis.db || 0
}
}
},
logging: log,
logger: log ? new MyCustomLogger() : undefined,
entities: [