Expand description
TTL-based cache for git command results.
Prevents redundant git invocations within the same session by caching results with a configurable time-to-live (default 10s for status/diff, 60s for log).
Functionsยง
- git_
cached - Run a git command with TTL caching. Returns cached result if available.
- git_
diff_ cached - Short-TTL (10s) for git diff.
- git_
log_ cached - Longer-TTL (60s) for git log (rarely changes within a session).
- git_
status_ cached - Short-TTL (10s) for frequently-changing git data (status, diff).
- invalidate
- Invalidate all cached entries for a given directory.