MCPcopy Create free account
hub / github.com/idosal/git-mcp / getCacheTTL

Function getCacheTTL

src/api/utils/cache.ts:15–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14// Cache TTL in seconds (12 hours with jitter)
15function getCacheTTL(): number {
16 const jitterAmount = BASE_TTL * JITTER_FACTOR;
17 const jitter = Math.random() * (jitterAmount * 2) - jitterAmount; // Random value between -jitterAmount and +jitterAmount
18 return Math.floor(BASE_TTL + jitter);
19}
20
21/**
22 * Cache key structure for repository file paths

Callers 4

setInCacheFunction · 0.85
cacheFilePathFunction · 0.85
cacheRobotsTxtFunction · 0.85
cacheIsIndexedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected