MCPcopy Index your code
hub / github.com/promptfoo/promptfoo / getSearchParamsForFetchCacheKey

Function getSearchParamsForFetchCacheKey

src/cache.ts:382–390  ·  view source on GitHub ↗
(searchParams: URLSearchParams)

Source from the content-addressed store, hash-verified

380}
381
382function getSearchParamsForFetchCacheKey(searchParams: URLSearchParams): unknown {
383 if (!hasSensitiveSearchParam(searchParams)) {
384 return searchParams.toString();
385 }
386 return Array.from(searchParams.entries()).map(([name, value]) => [
387 name,
388 getStringForFetchCacheKey(value, name),
389 ]);
390}
391
392function getUrlForFetchCacheKey(url: RequestInfo) {
393 const urlString = url instanceof Request ? url.url : String(url);

Callers 2

getUrlForFetchCacheKeyFunction · 0.85
getBodyForFetchCacheKeyFunction · 0.85

Calls 3

hasSensitiveSearchParamFunction · 0.85
toStringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…