forked from Minecraft/Stonks
Reduce cache duration to 5min
parent
ad466ca35b
commit
b8d642e393
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue