LEVEL 4
Context Caching
Slash costs and latency by caching massive prompts. Part of the free Vertex AI Academy — every lesson below is open to everyone, no signup required.
3 lessons700 XP~35 min total100% free
// LESSONS IN THIS MODULE
- 01How Context Caching Works15m · 300 XP
Slashing Costs by 70% When you cache a large prompt (like a codebase or a 1-hour video), Google processes the input and stores the Key-Value (KV) cach...
- 02Using a Cached Content10m · 200 XP
Querying the Cache Once a cache is created, you instantiate a GenerativeModel pointing to the cache instead of providing the massive context again. fr...
- 03TTL and Cache Economics10m · 200 XP
Time-To-Live (TTL) Caches are not free; you are billed per hour based on the number of tokens stored in the cache. Therefore, you must specify a TTL (...