Gemini Cookbook: Based on Google Materials · Lesson 5
Context Caching: Cache Large Documents
Upload the Apollo 11 transcript, create an explicit cache on gemini-3.8-flash with client.caches (v1beta, Gemini 3 and 2.5 only), manage TTL, use the cache in generate_content and multi-turn chat, and read usage_metadata. Then cover implicit caching in the Interactions API and Gemini 4 Hydrogen and calculate the cost.
One trial lesson is open without sign-up: what a large language model is →


