# What does a second CI run cost? Default caching in DeepEval and promptfoo (7 Nov 2026, IST)

One test case (refund-policy question, `case.py`) scored by each tool's LLM-judged check, with the judge pointed at a **local OpenAI-compatible stand-in** (`mock.py`, port 18766, model name `llama3.1:8b`; it logs every request and returns valid canned answers). `OPENAI_API_KEY` unset. Each tool was run twice in a row with the same HOME and working directory, so any on-disk cache survived between the two runs, the way it would on a developer laptop or a CI runner that keeps its cache.

Versions: deepeval 4.3.3 (PyPI 4 Nov 2026, Python 3.13.5), promptfoo 0.125.1 (Node v24). Telemetry opt-outs set (`DEEPEVAL_TELEMETRY_OPT_OUT=1`, `PROMPTFOO_DISABLE_TELEMETRY=1`, `PROMPTFOO_DISABLE_UPDATE=1`). Run 7 Nov 2026 ~11:23 IST with `runall.sh`.

- DeepEval: `deepeval test run test_faith.py` (FaithfulnessMetric, `LocalModel` judge), then the same with `-c` (use cache).
- promptfoo: `promptfoo eval --no-share -c promptfooconfig.yaml` (llm-rubric, grader set to the local model), then `--no-cache`.

## Results (raw/summary.txt; raw/*.requests.jsonl one line per request)

| Run | Exit | Requests to the local model |
|---|---|---|
| DeepEval, default, run 1 | 0 | 4 |
| DeepEval, default, run 2 | 0 | 4 |
| DeepEval `-c`, run 1 (cache file deleted first) | 0 | 4 |
| DeepEval `-c`, run 2 | 0 | 0 |
| promptfoo, default, run 1 | 0 | 2 (answer + grade) |
| promptfoo, default, run 2 | 0 | 0 |
| promptfoo `--no-cache`, run 3 | 0 | 2 |

What we saw:
- **promptfoo caches by default.** The second run made no requests at all, neither the answer from the provider under test nor the grade; results came from `~/.promptfoo/cache/cache.json`. `--no-cache` went back to 2 requests.
- **DeepEval does not read a cache unless you pass `-c`**, so every default run paid for the judge again (4 requests). With `-c`, the second run made 0 requests.
- **DeepEval writes its cache file on every run, `-c` or not**, into `.deepeval/.deepeval-cache.json` in the working directory (not HOME): `raw/deepeval-cache-after-default-runs.json` was written by the two default runs. So a later `-c` run in the same folder reuses scores from earlier default runs. In a first attempt, before we deleted that file between scenarios, our first `-c` run made 0 requests for exactly this reason (that attempt's logs were overwritten; `runall.sh` now deletes the file first).

Caveats: the stand-in always returns the same answer, so scores are meaningless; this checks request counts only. What makes a cache hit (which inputs and settings are part of the key) we did not test beyond re-running identical inputs. One run each, these versions and defaults.

Files: mock.py, case.py (from our 4 Nov test), test_faith.py, promptfooconfig.yaml, runall.sh, raw/.
