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

@@ -57,10 +57,10 @@ export default define(meta, async () => {
driveUsageLocal,
driveUsageRemote
] = await Promise.all([
Notes.count(),
Notes.count({ userHost: null }),
Users.count(),
Users.count({ host: null }),
Notes.count({ cache: 3600000 }), // 1 hour
Notes.count({ where: { userHost: null }, cache: 3600000 }),
Users.count({ cache: 3600000 }),
Users.count({ where: { host: null }, cache: 3600000 }),
federationChart.getChart('hour', 1).then(chart => chart.instance.total[0]),
driveChart.getChart('hour', 1).then(chart => chart.local.totalSize[0]),
driveChart.getChart('hour', 1).then(chart => chart.remote.totalSize[0]),