File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ export class LeaderboardService {
1717 private readonly clanService : ClanService ,
1818 ) { }
1919
20+ /**
21+ * Leaderboard data update interval in second, 3h
22+ */
23+ private readonly LEADERBOARD_TTL_S = 10800 ;
24+
2025 /**
2126 * Retrieves the clan leaderboard data.
2227 *
@@ -73,7 +78,11 @@ export class LeaderboardService {
7378 data = await this . processCacheData ( model , fetchedData ) ;
7479
7580 // Set the data with 12 hour ttl. The { ttl: number } as any is required to overwrite the default value.
76- await this . redisService . set ( cacheKey , JSON . stringify ( data ) , 60 * 60 * 12 ) ;
81+ await this . redisService . set (
82+ cacheKey ,
83+ JSON . stringify ( data ) ,
84+ this . LEADERBOARD_TTL_S ,
85+ ) ;
7786 }
7887
7988 if ( reqQuery ) {
You can’t perform that action at this time.
0 commit comments