Context
從 #173 拆出。第一版 recap 每次都呼叫 LLM。快取是 Phase 1 mobile (#174) 的前置需求 — mobile app 讀快取,不需要每次觸發 LLM。
Parent epic: #172
Related: #173 (recap pipeline), #174 (mobile delivery)
目標
Recap 結果快取,避免同一 anchor 重複呼叫 LLM。
快取結構
~/.edda/chronicle/cache/
├── <hash>.json # hash = anchor params 的 deterministic hash
└── index.json # { hash → { created, anchor_desc, ttl } }
行為
架構
edda-chronicle/src/
cache.rs
├── get_cached(anchor_hash) → Option<RecapResult>
├── store_result(anchor_hash, result, ttl)
├── invalidate_stale() # 比對 latest session timestamp
└── cache_key(anchor) → hash # deterministic hash of anchor params
驗收標準
Context
從 #173 拆出。第一版 recap 每次都呼叫 LLM。快取是 Phase 1 mobile (#174) 的前置需求 — mobile app 讀快取,不需要每次觸發 LLM。
Parent epic: #172
Related: #173 (recap pipeline), #174 (mobile delivery)
目標
Recap 結果快取,避免同一 anchor 重複呼叫 LLM。
快取結構
行為
--freshflag → 忽略快取,強制重新生成/api/recap/cachedendpoint 直接讀這個快取架構
驗收標準
--fresh忽略快取