feat: increased secret caching to 10mins with jitter of 2min

This commit is contained in:
=
2025-04-29 00:36:39 +05:30
parent 6a26a11cbb
commit fcf984965e
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;
};