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

  1. 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...

  2. 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...

  3. 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 (...

Explore the full Vertex AI Academy โ†’
Context Caching โ€” Vertex AI Academy Module | Free Lessons