feat(server): 系统缓存清理接口与 OCR 文本层兜底增强
- 新增 system_cache 模块与 POST /settings/cache/clear,管理员可一键清理 OCR 结果/运行时配置/模型失败冷却/知识库索引/地点语义等进程内缓存 - 各服务暴露 clear_*_cache 方法(ocr/runtime_settings/runtime_chat/knowledge/application_location_semantic),SettingsCacheClearRead 汇总清理项 - OCR 转图片失败时尝试用 PDF 文本层兜底构建识别文档(有效字符≥8),并写结果缓存;OcrService 暴露 clear_result_cache - receipt_folder 车票过滤补充身份证号关键词,附件文档/操作/展示模块同步适配 - 新增 system_cache_endpoints 测试,更新 openapi_schema/ocr/receipt_folder/attachment_association_jobs 测试
This commit is contained in:
@@ -49,5 +49,8 @@ def test_openapi_schema_includes_documented_backend_routes() -> None:
|
||||
analytics_get = schema["paths"]["/api/v1/analytics/system-dashboard"]["get"]
|
||||
assert analytics_get["summary"] == "查询系统看板真实指标"
|
||||
|
||||
settings_cache_clear_post = schema["paths"]["/api/v1/settings/cache/clear"]["post"]
|
||||
assert settings_cache_clear_post["summary"] == "清理系统缓存"
|
||||
|
||||
root_get = schema["paths"]["/"]["get"]
|
||||
assert root_get["summary"] == "服务根检查"
|
||||
|
||||
Reference in New Issue
Block a user