Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重构缓存逻辑 #412

Merged
merged 6 commits into from
Dec 6, 2024
Merged

重构缓存逻辑 #412

merged 6 commits into from
Dec 6, 2024

Conversation

magicyuan876
Copy link
Contributor

重构缓存代码,缓存命中记录日志,缓存按照查询mode分组隔离

yuanxiaobin added 6 commits December 6, 2024 14:29
- 提取通用缓存处理逻辑到新函数 handle_cache 和 save_to_cache
- 使用 CacheData 类统一缓存数据结构
- 优化嵌入式缓存和常规缓存的处理流程
- 添加模式参数以支持不同查询模式的缓存策略
- 重构 get_best_cached_response 函数,提高缓存查询效率
- 在 json.dumps 中添加 ensure_ascii=False 参数,以支持非 ASCII 字符编码
-这个修改确保了包含中文等非 ASCII 字符的日志信息能够正确处理和显示
# Conflicts:
#	lightrag/llm.py
#	lightrag/operate.py
@LarFii LarFii merged commit fd564b5 into HKUDS:main Dec 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants