Expand description
On-disk cache that makes re-runs fast. Everything lives under one
tool-specific directory in the XDG cache location
($XDG_CACHE_HOME/contributor-graphs, else ~/.cache/contributor-graphs):
clones/<key>/bare partial clones (seecrate::repo).commits/<key>.jsonparsedgit logoutput, keyed by the branch tip SHA so it is reused only while the history is unchanged.github/authors.jsoncommit SHA -> resolved GitHub login + avatar URL (immutable, so never expires).github/profiles.jsonlogin -> display name + company (time-limited).github/avatars.jsonavatar URL -> embedded data URI (time-limited).
The git-history and clone caches alone turn a multi-minute whole-org run into a few seconds when nothing has changed; the GitHub caches remove the thousands of API calls and avatar downloads on top of that.
Structs§
- Author
- Cached
Commit - A commit as stored in the git-history cache (no source index; that is re-assigned per run when the pool is rebuilt).
- Caches
- In-memory view of the GitHub caches for one run. Loaded once, queried before
any network call, and written back at the end. Reads are skipped (treated as
misses) when
refreshis set, but existing entries are still preserved on save so unrelated repositories keep their cache. - Commits
Cache - One repository’s cached
git log, valid only whiletipand the filters still match the live repository.
Functions§
- root
- The tool’s cache directory, or
Noneif no home/XDG dir can be found.