From b8d642e393d3f43edcdf8245ede2290b9cd502d3 Mon Sep 17 00:00:00 2001 From: Kevin Belisle Date: Mon, 19 Jul 2021 03:00:26 -0400 Subject: [PATCH] Reduce cache duration to 5min --- app/src/main/kotlin/xyz/etztech/stonks/Api.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/xyz/etztech/stonks/Api.kt b/app/src/main/kotlin/xyz/etztech/stonks/Api.kt index 4bb91ab..2e50343 100644 --- a/app/src/main/kotlin/xyz/etztech/stonks/Api.kt +++ b/app/src/main/kotlin/xyz/etztech/stonks/Api.kt @@ -36,7 +36,7 @@ fun initApiServer(apiServerPort: Int, database: Database) { run { if (statisticsCache.isEmpty() or (Duration.between(Instant.now(), statisticsCacheTimestamp) > - Duration.ofHours(1)) + Duration.ofMinutes(5)) ) { transaction(database) { addLogger(StdOutSqlLogger) @@ -93,7 +93,7 @@ fun initApiServer(apiServerPort: Int, database: Database) { run { if (playersCache.isEmpty() or (Duration.between(Instant.now(), playersCacheTimestamp) > - Duration.ofHours(1)) + Duration.ofMinutes(5)) ) { transaction(database) { addLogger(StdOutSqlLogger)