Does project-level cacheConfig (EPHEMERAL) apply to the Gemini Developer API, or Vertex AI only?

We set our project’s cacheConfig to retentionConfig.retentionType = EPHEMERAL (via the Vertex AI endpoint) to opt out of Durable Caching (GA Oct 15, 2026) for implicit caching.

However, our production traffic uses the Gemini Developer API (generativelanguage.googleapis.com, API-key), not Vertex AI.

Question: Does this project-level cacheConfig (EPHEMERAL) also govern implicit caching durability for requests sent through the Developer API for the same project, or is cacheConfig scoped to Vertex AI only?

If Developer-API implicit caching is governed separately, how do we set it to ephemeral (no durable at-rest storage)? This matters for our data-residency/at-rest requirements. Thanks!

Hello @Jeongsang_KIM ,

  1. The project-level cacheConfig (retentionConfig.retentionType = EPHEMERAL) applies exclusively to requests sent through Vertex AI (aiplatform.googleapis.com) and does not govern the Gemini Developer API (generativelanguage.googleapis.com). See the Vertex AI Context Caching Documentation

  2. Caching behavior on the Gemini Developer API is managed via explicit CachedContent resources or built-in implicit caching (Gemini API Context Caching Guide). There is currently no corresponding project-level control plane setting on generativelanguage.googleapis.com to configure implicit caching retention or storage durability.

  3. If your organization’s data residency, compliance, or data-at-rest policies require strict control over storage durability (such as forcing ephemeral-only memory storage), you should migrate your production traffic from the Gemini Developer API (API keys) to Vertex AI on Google Cloud. Vertex AI supports enterprise data governance, CMEK, and project-level retention policies.