mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
How can enable to cache for Gemini? #827
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @joneqian on GitHub (Nov 24, 2025).
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
How can enable to cache for Gemini?
2. Additional context or comments
No response
3. Can you help us with this feature?
@dosubot[bot] commented on GitHub (Nov 24, 2025):
There’s currently no user-facing setting or documented way to enable prompt/response caching for Gemini in Dify. The platform does implement automatic in-memory caching for model schemas—including Gemini—using a central cache key, but this only speeds up model metadata lookups and doesn’t cache actual prompt responses or completions see code reference.
For file uploads (like video/audio), Gemini models use Google’s upload file API, which does cache uploaded files for efficiency, but this is specific to file handling—not general LLM prompt caching details.
If you’re looking for prompt/response caching to reduce API usage or costs, this isn’t currently configurable or documented for Gemini in Dify. Users have requested more clarity and options, so it’s worth watching for future updates or contributing to the documentation if this feature is important discussion.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@joneqian commented on GitHub (Nov 24, 2025):
I think most people need this feature.
@nadazero commented on GitHub (Dec 1, 2025):
gemini 2.5以上的模型API自动支持隐式调用cache,所以相当于默认就开启了。
至于显示调用cache,看了下API,相当麻烦,需要调用API去主动存数据,我不认为用起来很方便。
@dosubot[bot] commented on GitHub (Dec 17, 2025):
Hi, @joneqian. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
What's Next:
Thank you for your understanding and contribution!