feat(14-03): implement SemanticCache for content-based caching
- compute_content_hash(): 计算 SHA256 内容哈希 - SemanticCache.get(): 从缓存读取 SegmentationResult - SemanticCache.set(): 保存 SegmentationResult 到缓存 - 支持版本控制(CACHE_VERSION = '1.0') - 缓存存储在 .planning/cache/semantic/ 目录 - 错误容错:缓存失败不影响主流程 - 自动创建缓存目录 遵守用户决策: - 缓存键: SHA256 内容哈希 - 缓存存储: 本地文件系统 - 缓存 TTL: 永久有效 - 缓存内容: 完整的 SegmentationResult Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
"""语义分段缓存模块"""
|
||||
|
||||
from kb_workflow.srt.cache.semantic_cache import (
|
||||
SemanticCache,
|
||||
compute_content_hash
|
||||
)
|
||||
|
||||
__all__ = ['SemanticCache', 'compute_content_hash']
|
||||
Reference in New Issue
Block a user