Imagina RPG Docs
Help center

What is the model cache?

The model cache (providers usually call this a prompt cache) is a short-lived copy of your story context. When it is warm, the next turn can reuse most of that context and usually costs less. When it is cold, the model reads everything...

The model cache (providers usually call this a prompt cache) is a short-lived copy of your story context. When it is warm, the next turn can reuse most of that context and usually costs less. When it is cold, the model reads everything fresh and the turn costs more.

That is why the first turn of a session is often a little pricier, and the turns right after it land cheaper. It is not a discount we hand-pick. It comes from how AI models read your story.

Why a turn costs what it costs

Every time you submit an action, Imagina does not just send your new sentence to the model. It sends the whole context the model needs to keep your story coherent: the world's lore and characters, your trackers and state, and a good chunk of your recent history. That bundle of text is measured in tokens, and you pay for the tokens the model reads on every turn.

The longer and richer your story, the bigger that bundle, which is why later turns in a long journey tend to cost more than the opening ones. (More on that in What is the credit system?.)

Where the cache comes in

From one turn to the next, most of that context does not change. The world's lore is the same. Your earlier history is the same. Only the tail end (your new action and the model's fresh response) is new.

AI providers take advantage of this. The first time they read your context, they keep a short-lived cache of it. On your next turn, instead of re-reading all that unchanged text from scratch, they reuse the cached copy and only fully process the new part. Cached tokens are billed at a fraction of the normal rate, so the turn comes out cheaper.

In short:

  • First turn after a pause: the model reads everything fresh. Full price (a "cache miss").
  • Next turns, played soon after: most of the context is served from cache. Cheaper (a "cache hit").

What keeps the cache warm

The cache is a convenience for the provider, not a promise, so it has limits. Two things matter:

  • Time. The cache is short-lived, usually a few minutes. If you play several turns back-to-back, each one rides the warm cache and stays cheap. If you wander off and come back hours later, the cache has expired, and your next turn pays the full "first turn" price again before things warm back up.
  • Staying on the same model. The cache belongs to one specific model. The moment you switch models, the new model has never seen your story, so it reads the whole context fresh. That first turn on the new model costs like a first turn. Switch back and forth often and you keep paying the cache-miss price.

Changing settings or editing the story after a turn has the same effect: the cached copy no longer matches what the next request will send, so the next turn starts cold.

So how do I keep turns cheap?

You do not have to do anything special, but if you are watching your credits:

  • Play in focused sessions. A run of turns in one sitting is cheaper per turn than the same turns spread out across the day.
  • Pick a model and stick with it for a while. Switching is totally fine and sometimes exactly what you want (a stronger model for a big scene, a cheaper one when credits are tight). Just expect the first turn after a switch to land closer to full price, then settle down again as the cache rebuilds.

None of this changes the story or the quality of your turns. It is purely about cost.

Related reads: What is the credit system? and How do I pick a model?

On this page