mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
Repeatedly switching time filters recomputed expensive analytics/NLP queries from scratch (e.g. a 1-year word cloud took 10s+ after a detour through 5-year), because cancelling the network request cannot stop the synchronous server-side computation. Add a shared, platform-agnostic disk cache under cacheDir/query, validated by a fingerprint derived from the session DB file (mtime+size of the main file and its -wal sidecar) so any import, incremental import or member edit transparently invalidates it. Wire it through the shared HTTP routes (word-frequency plus all analytics endpoints), so CLI Web and the desktop internal server share one implementation. Co-authored-by: Cursor <cursoragent@cursor.com>