Skip to content
tokz

Guide

Prompt caching explained for context-heavy AI systems

Prompt caching reuses a provider-recognized portion of a request. It rewards stable prefixes; compression changes the request and therefore needs cache-aware policy.

Caching and compression are complementary

Cache stable instructions when they repeat. Compress changing tool or retrieval context when it is oversized or irrelevant.

Watch cache writes and reads

A cache miss or rewritten prefix can erase expected savings. Track provider usage rather than inferring it from prompt length.

Keep unknowns visible

Different providers expose different cache fields and prices. A cost report should not treat unavailable data as zero.