Does prompt caching actually cut LLM cost? A cost-model experiment

A first-principles cost model showing how much prompt caching saves as a function of two variables you control: the share of input that is a stable prefix, and how often it repeats.