Hi everyone,
I’m trying to understand the implicit caching behavior of Gemini 3.1 Flash-Lite when sending identical requests multiple times.
Test environment
-
Model:
gemini-3.1-flash-lite -
API: Gemini Developer API
-
Request type: Stateless
-
Input prompt length: Approximately 5,500 tokens
-
Requests: Multiple consecutive requests with exactly the same prompt
Observed behavior
When I send the exact same 5,500-token prompt multiple times, the API reports:
cached_content_token_count: 2088
I expected that after the first request, subsequent identical requests would reuse most, if not nearly all, of the previously processed input tokens.
However, only approximately 2,088 tokens are reported as cached, while the remaining 3,400+ tokens appear to be processed as regular input.
My questions: Why does Gemini only cache 2,088 tokens when the entire 5,500-token prompt is identical across requests?
I understand that implicit caching is not guaranteed for every request. However, in this test, the prompt is identical across multiple requests, and the cached token count consistently raises questions about how much of the input is actually being reused.
Could someone clarify why only 2,088 out of approximately 5,500 identical input tokens are cached?
Thank you.