From 03994daf041d3a4c0112e19319d2f2fee66c0164 Mon Sep 17 00:00:00 2001 From: fcaps Date: Tue, 21 Nov 2023 08:48:48 +0100 Subject: [PATCH] lower ttl --- lib/LeaderboardService.js | 2 +- tests/LeaderboardService.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/LeaderboardService.js b/lib/LeaderboardService.js index 59e69535..501de2c8 100644 --- a/lib/LeaderboardService.js +++ b/lib/LeaderboardService.js @@ -1,4 +1,4 @@ -const leaderboardTTL = 60 * 60 * 4 // 4 hours ttl as a relaxation for https://github.com/FAForever/website/issues/482 +const leaderboardTTL = 60 * 60 // 1 hours ttl as a relaxation for https://github.com/FAForever/website/issues/482 class LeaderboardService { constructor(cacheService, mutexService, leaderboardRepository, lockTimeout = 3000) { diff --git a/tests/LeaderboardService.test.js b/tests/LeaderboardService.test.js index 5ae0545b..439991b8 100644 --- a/tests/LeaderboardService.test.js +++ b/tests/LeaderboardService.test.js @@ -122,7 +122,7 @@ test('full scenario', async () => { expect(cacheSetSpy).toHaveBeenCalledTimes(1); const date = new Date() - date.setSeconds(date.getSeconds() + (60 * 60 * 4) + 1) + date.setSeconds(date.getSeconds() + (60 * 60) + 1) jest.setSystemTime(date); // start another with when the cache is stale