Skip to content

Commit dc71a3e

Browse files
committed
perf: Refine the Model Manager code
1 parent 4ac4d08 commit dc71a3e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/common/config/embedding_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ def get_model(_id, get_model):
3030
else:
3131
if model_instance.is_cache_model():
3232
ModelManage.cache.touch(_id, timeout=60 * 60 * 8)
33+
ModelManage.clear_timeout_cache()
3334
return model_instance
3435
else:
3536
model_instance = get_model(_id)
3637
ModelManage.cache.set(_id, model_instance, timeout=60 * 60 * 8)
38+
ModelManage.clear_timeout_cache()
3739
return model_instance
3840

3941
@staticmethod

0 commit comments

Comments
 (0)