Merge pull request #3505 from akhilmhdh/feat/cache-jitter

feat: increased secret caching to 10mins with jitter of 2min
This commit is contained in:
Maidul Islam
2025-04-28 12:16:00 -07:00
committed by GitHub
3 changed files with 8 additions and 7 deletions
+3 -3
View File
@@ -2,7 +2,7 @@ export const daysToMillisecond = (days: number) => days * 24 * 60 * 60 * 1000;
export const secondsToMillis = (seconds: number) => seconds * 1000;
export const applyJitter = (delayMs: number, jitterMs: number) => {
const jitter = Math.floor(Math.random() * (2 * jitterMs)) - jitterMs;
return delayMs + jitter;
export const applyJitter = (delay: number, jitter: number) => {
const jitterTime = Math.floor(Math.random() * (2 * jitter)) - jitter;
return delay + jitterTime;
};