diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-05-25 08:50:07 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-05-25 08:50:07 +0900 |
| commit | f9afebc12e26f0e9bc0f792726234011b76e1022 (patch) | |
| tree | dd8a39a76b2005969ad279ec4ab512597328acb5 /src/server/api/endpoints/stats.ts | |
| parent | :art: (diff) | |
| parent | Enable query result cache for meta / stats / hashtags trend (#4978) (diff) | |
| download | misskey-f9afebc12e26f0e9bc0f792726234011b76e1022.tar.gz misskey-f9afebc12e26f0e9bc0f792726234011b76e1022.tar.bz2 misskey-f9afebc12e26f0e9bc0f792726234011b76e1022.zip | |
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
Diffstat (limited to 'src/server/api/endpoints/stats.ts')
| -rw-r--r-- | src/server/api/endpoints/stats.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/api/endpoints/stats.ts b/src/server/api/endpoints/stats.ts index f85109b4b4..4dca62445f 100644 --- a/src/server/api/endpoints/stats.ts +++ b/src/server/api/endpoints/stats.ts @@ -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]), |