Same idea, different knobs
OpenAI prompt caching is automatic for eligible prompts and exposes cached_tokens in usage. Anthropic uses explicit cache_control breakpoints and reports cache_creation_input_tokens and cache_read_input_tokens. Gemini offers implicit and explicit context caching with its own token thresholds and TTL behavior.
Portable idea, provider-specific implementation
The portable idea is stable prefix reuse. The provider-specific implementation changes. Design your app around the idea, then adapt the adapter layer to the provider. Apps that hardcode one provider's caching mechanism become very awkward when adding a second.
Keep abstractions honest
Do not hide all provider details. Your telemetry should still record which provider, model, cache mode, and cached token count were used. The differences exist; pretending they do not creates the worst kind of bug — works on provider A, fails silently on B.