Your response cache served 38.5 percent of the questions in a simulated morning with no stale answers, but only when the wording matched. “Is the Lauzet footbridge open this morning?” still waits for the model.
In this lesson, you’ll state which answers the assistant may cache, then test the tempting fix for rewordings, matching by meaning, before any hiker sees it.
Decide What the Cache May Hold
A cached answer is safe to serve again only when the key names everything that shaped it. For the assistant, a conditions question asks about one place. Its answer comes from the reports block and stays the same for every hiker until a warden files a report. The last lesson’s cacheable() guard lets only those through:
| Question | Cached? | Why |
|---|---|---|
| “Is the Lauzet footbridge open?” | Yes | Reports, date, and question are all in the key |
| “Are there beds at hut 6 tonight?” | No | Beds change with each booking, which no report tracks |
| “I’m booked at hut 3, RH-48213. Is the Lauzet footbridge open?” | No | The answer may concern their booking, and caching copies their details |
Cache an answer only when your key holds everything it depends on. A refused question costs one model call. A wrong hit serves someone else’s answer. This button opens the mentor with a question ready, so you can describe what your own feature answers: