mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
[PR #2325] [MERGED] Fix: Race condition with GetInferenceProfile cache implementation #2402
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?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-official-plugins/pull/2325
Author: @ericfzhu
Created: 12/25/2025
Status: ✅ Merged
Merged: 12/25/2025
Merged by: @crazywoola
Base:
main← Head:main📝 Commits (3)
369d280Fix race condition with GetInferenceProfile cache implementation, also adds sliding TTL to refresh the cache on hitf68c662Clears _fetch_locks key when cache entry expires1116734Removed previous change re. clearing fetch_lock key on cache expiry, added LRU cache instead📊 Changes
2 files changed (+66 additions, -34 deletions)
View changed files
📝
models/bedrock/manifest.yaml(+1 -1)📝
models/bedrock/utils/inference_profile.py(+65 -33)📄 Description
This is a proposed solution to #2324, where multiple concurrent requests can result in multiple threads bypassing the inference profile cache and calling GetInferenceProfile.
I've also modified the cache to refresh the TTL on cache hit.
Related Issues or Context
#2324
This PR contains Changes to Non-Plugin
This PR contains Changes to Non-LLM Models Plugin
This PR contains Changes to LLM Models Plugin
Version Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)Dify Plugin SDK Version
dify_plugin>=0.3.0,<0.6.0is in requirements.txt (SDK docs)Environment Verification (If Any Code Changes)
Local Deployment Environment
SaaS Environment
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.