Understanding Prompt caching
Caching lets Craig reuse a recent result instead of fetching fresh data every time a Prompt is run. For Prompts that are run frequently or by multiple users, caching can reduce both wait time and credit usage — without sacrificing the accuracy your team needs.
This article explains how caching works and how to use it effectively.
How caching works
When you set a Cache Duration on a Prompt, Craig stores the result of the first execution for that length of time. If the same Prompt is run again by anyone — you or another user — before the cache duration has elapsed, Craig serves the stored result instantly instead of running the Prompt again.
Once the cache duration has passed since the last fetch, the next run will trigger a fresh execution. That new result is then cached again for the same duration, and the cycle repeats.
Example: A Prompt has a 15-minute Cache Duration.
- 9:00 AM — A user runs the Prompt. Craig fetches fresh data and caches the result.
- 9:10 AM — A different user runs the same Prompt. Because it's within 15 minutes of the last fetch, Craig serves the cached result instantly.
- 9:20 AM — A third user runs the Prompt. More than 15 minutes have passed since the 9:00 AM fetch, so Craig runs the Prompt fresh and caches the new result.
The cache duration always counts from the most recent fetch, not from a fixed schedule. Every fresh execution restarts the clock.
What you'll see
There is no visible difference between a cached result and a freshly fetched one — the Prompt output, the model indicator, and the credit estimate all display normally either way. Caching happens behind the scenes, so your team always sees the same clean result regardless of whether it came from a fresh fetch or the cache.
Why use caching
Faster results for your team. A cached result is returned instantly, with no wait for Craig to query external data sources.
Reduced credit usage. A cached result does not trigger a new execution, so it does not consume additional credits. One fetch can serve many users at no extra cost. See Craig Credits and Pricing for more detail.
Consistency across your team. When multiple people run the same Prompt within a short window — for example, several responders checking conditions at the start of an incident — caching ensures everyone sees the same data rather than slightly different results from near-simultaneous fetches.
Choosing the right Cache Duration
The right Cache Duration depends entirely on how quickly the underlying data changes — not on how often you expect the Prompt to be run.
Good candidates for caching:
- Tide charts and astronomical data — change predictably and slowly.
- Daily forecasts and outlooks — typically updated a few times per day.
- Avalanche bulletins — usually issued once or twice daily.
Poor candidates for caching:
- Severe weather alerts and warnings.
- Tsunami warnings.
- Real-time hydrometric or gauge readings during a fast-moving event.
For rapidly changing or safety-critical data, leave Cache Duration unset, or set a very short duration. A cached result that's even a few minutes out of date could be misleading during an active event — the speed and cost savings are not worth the risk.
There is no maximum Cache Duration — you can set any value in minutes that makes sense for your data. Choose a duration based on how often the source data actually updates, not how often your team checks it.
Setting a Cache Duration
Cache Duration is configured individually for each Prompt. See Configuring Prompts for step-by-step instructions.