Skip to main content

Module cache

Module cache 

Source

Functionsยง

diff_hash
Compute a fast hash of the raw diff string.
get_head_commit
Return the current HEAD commit hash, or None if not in a git repo.
load
Try to load cached grouping for the given diff hash. Returns None if no cache, hash mismatch, parse error, or oversized file.
load_incremental
Try to load cached grouping for the given HEAD commit (incremental mode). Returns the cached groups and file hashes so the caller can compute the delta. Returns None if no cache, HEAD mismatch, empty file hashes, parse error, or oversized file.
save_with_state
Save grouping result to the cache file with optional incremental state.