MCPcopy
hub / github.com/promptfoo/promptfoo / getCacheTtlMs

Function getCacheTtlMs

src/cache.ts:46–48  ·  view source on GitHub ↗

* Get the cache TTL in milliseconds. * Reads from PROMPTFOO_CACHE_TTL environment variable (in seconds) or uses default.

()

Source from the content-addressed store, hash-verified

44 * Reads from PROMPTFOO_CACHE_TTL environment variable (in seconds) or uses default.
45 */
46function getCacheTtlMs(): number {
47 return getEnvInt('PROMPTFOO_CACHE_TTL', DEFAULT_CACHE_TTL_SECONDS) * 1000;
48}
49
50/**
51 * Get the cache instance with optional namespace isolation.

Callers 1

getCacheInstanceFunction · 0.85

Calls 1

getEnvIntFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…