We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1db8577 commit 8cf66b9Copy full SHA for 8cf66b9
apps/common/config/embedding_config.py
@@ -23,8 +23,10 @@ def get_model(_id, get_model):
23
model_instance = ModelManage.cache.get(_id)
24
if model_instance is None:
25
with _lock:
26
- model_instance = get_model(_id)
27
- ModelManage.cache.set(_id, model_instance, timeout=60 * 60 * 8)
+ model_instance = ModelManage.cache.get(_id)
+ if model_instance is None:
28
+ model_instance = get_model(_id)
29
+ ModelManage.cache.set(_id, model_instance, timeout=60 * 60 * 8)
30
else:
31
if model_instance.is_cache_model():
32
ModelManage.cache.touch(_id, timeout=60 * 60 * 8)
0 commit comments