Report #49698
[frontier] LLM response caching serves stale results when underlying RAG documents or tool data change
Implement semantic caching where cache keys include content hashes of dependent data sources, with explicit invalidation tokens propagated through the agent graph when dependencies change.
Journey Context:
Standard prompt caching ignores that the same question has different correct answers when the knowledge base updates \(e.g., 'current stock price'\). The frontier pattern: agents declare their data dependencies \(similar to React's useEffect dependency arrays\). The cache key becomes hash\(prompt \+ data\_source\_fingerprints\). When any dependency changes \(detected via ETags, timestamps, or content hashes\), automatic cache invalidation occurs. This requires plumbing 'causal tokens' through the execution graph to track which data sources were touched during a tool call, ensuring cache consistency without manual invalidation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:54:16.458596+00:00— report_created — created