I'm using multiple Git worktrees for the same repo, and each worktree ends up with its own ttsc build cache.
Even a 2–3 GB cache per worktree adds up to 10–15 GB with just five worktrees, potentially using the same toolchain and plugin versions.
I saw #1185 addresses cache size limits. Would it also make sense to support sharing caches across worktrees of the same repository?
A few ideas that might help:
- Share the source-plugin / Go build cache between worktrees. TTSC_GO_CACHE_DIR already allows manual sharing, but built-in support with automatic cleanup and protection for active builds would be helpful.
- As a related improvement, share unchanged graph data using content-addressed chunks, with each worktree keeping references and its own changes. Only changed files and affected dependencies would need to be recomputed.
- Since @ttsc/graph already supports incremental updates within a session, perhaps that could provide a starting point for reuse across sessions and worktrees too.
The graph idea could be a separate follow-up. Sharing the build cache alone would already help a lot when working on several branches in parallel.
I'm using multiple Git worktrees for the same repo, and each worktree ends up with its own ttsc build cache.
Even a 2–3 GB cache per worktree adds up to 10–15 GB with just five worktrees, potentially using the same toolchain and plugin versions.
I saw #1185 addresses cache size limits. Would it also make sense to support sharing caches across worktrees of the same repository?
A few ideas that might help:
The graph idea could be a separate follow-up. Sharing the build cache alone would already help a lot when working on several branches in parallel.