promptdojo_

Prompt caching correctly — the variable input goes LAST — step 7 of 9

This workflow needs the cached system prompt to survive a 20-minute gap while a tool runs. The dev shipped without ttl, relying on the default 5-minute cache window. That means the next call can miss the cache and pay another write.

Fix the cache_control to pass ttl: "1h" explicitly so the cache TTL matches the product requirement.

Expected output:

ttl: 1h
The break is on line 5 — but read the whole snippet first.

full-screen editor opens — close anytime to keep reading.