TokenPad
Optimisation

Prompt Cache Structure Checker

Find the timestamp at line two that is destroying your cache hit rate.

Your assembled prompt, in the order it is sent

Paste the assembled prompt in the exact order you send it.

184 characters5 lines0 tokensor drop a file

Cache CheckerExact
0Cacheable prefix
Cacheable prefix0tokens (0% of the prompt)
Cache breakers0timestamps, ids, dates
Read rate~0.1×what a cache hit costs vs base input
Token cost of this result
Output tokens0
As input$0.00
× 100K requests$0.00

Everything on this page runs in your browser. Nothing you paste is transmitted, because there is no server here to transmit it to.

Result
 

Caching matches from the very beginning

Prompt caching is a prefix cache. The match must start at the first character and run contiguously, so a single variable token near the top invalidates everything after it.

This is overwhelmingly the reason teams conclude that caching does not work for them. The feature is enabled, the prompt looks stable, and a request id on line two means nothing is ever reused.

The order that works

System prompt, then tool definitions, then stable reference documents, then conversation history, then the current user input. Everything fixed by construction goes first; everything that varies per request goes last.

If you genuinely need the current date in the prompt, put it immediately before the user input rather than in the system prompt — or round it to the day, so it invalidates the cache once every twenty-four hours instead of on every call.

Frequently asked questions

Why is there a minimum cacheable length?
Below roughly a thousand tokens the bookkeeping costs more than the reuse saves, so providers do not engage caching at all. A short prefix is not cached slowly — it is not cached.
Does reordering a prompt change the output?
It can, since position affects weighting. Move volatile content to the end and re-run your evaluations; in practice moving a request id has no measurable effect, while moving instructions might.

More optimisation tools