When Gemini's Context Cache Quietly Expires Mid-Run: A TTL Guard for Pipelines That Pause
When a nightly batch or a retry backoff pauses your pipeline, Gemini's explicit context cache can expire on the wall clock while nothing errors out, sending later calls back to full-token billing. Here is a small lease guard that decides whether to re-arm or run uncached based on cost.
When Context Caching Didn't Lower My Gemini Bill — Field Notes on Measuring the Real Hit Rate
When Context Caching is enabled but the Gemini API bill barely drops, this field note measures the real hit rate from usage_metadata, separates TTL churn from fragmentation, and walks through a staged recovery.
How I Cut My Gemini API Bill from ¥52,000 to ¥8,400 a Month — Caching, Model Routing, and the Batch API
A working record of cutting my Gemini API bill from ¥52,000 to ¥8,400 a month. Covers implicit vs. explicit caching, Flash/Pro routing rules, migrating to the Batch API, and a usage_metadata logging setup — with the production code I actually run.
Gemini API Context Caching— Cut Document Processing Costs by 90%
Learn how to use Gemini API's context caching to reduce repetitive document processing costs by up to 90%. Includes Python SDK implementation, caching strategies, and cost calculations.
Gemini 1M Token Long Context Strategies — Production Patterns for Large Document Processing
Master Gemini 2.5 Pro's 1M token context window for production workloads. Covers context caching, chunking strategies, RAG comparison, cost optimization, and real-world codebase + PDF corpus analysis.