MCPcopy
hub / github.com/promptfoo/promptfoo / clearCountCache

Function clearCountCache

src/models/evalPerformance.ts:103–111  ·  view source on GitHub ↗
(evalId?: string)

Source from the content-addressed store, hash-verified

101}
102
103export function clearCountCache(evalId?: string) {
104 if (evalId) {
105 distinctCountCache.delete(`distinct:${evalId}`);
106 totalRowCountCache.delete(`total:${evalId}`);
107 } else {
108 distinctCountCache.clear();
109 totalRowCountCache.clear();
110 }
111}
112
113// Optimized query for test indices without heavy JSON search
114export async function queryTestIndicesOptimized(

Calls 2

deleteMethod · 0.65
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…