Reduce cache duration to 5min

main
Kevin Belisle 2021-07-19 03:00:26 -04:00
parent ad466ca35b
commit b8d642e393
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ fun initApiServer(apiServerPort: Int, database: Database) {
run { run {
if (statisticsCache.isEmpty() or if (statisticsCache.isEmpty() or
(Duration.between(Instant.now(), statisticsCacheTimestamp) > (Duration.between(Instant.now(), statisticsCacheTimestamp) >
Duration.ofHours(1)) Duration.ofMinutes(5))
) { ) {
transaction(database) { transaction(database) {
addLogger(StdOutSqlLogger) addLogger(StdOutSqlLogger)
@ -93,7 +93,7 @@ fun initApiServer(apiServerPort: Int, database: Database) {
run { run {
if (playersCache.isEmpty() or if (playersCache.isEmpty() or
(Duration.between(Instant.now(), playersCacheTimestamp) > (Duration.between(Instant.now(), playersCacheTimestamp) >
Duration.ofHours(1)) Duration.ofMinutes(5))
) { ) {
transaction(database) { transaction(database) {
addLogger(StdOutSqlLogger) addLogger(StdOutSqlLogger)