Hash returns a hex SHA-256 of the given parts, used to build cache keys from
multiple inputs (e.g. all repo HEADs, or HEAD plus plan-file hash) so cached
entries invalidate when any contributing input changes.
type Cache struct {
// contains filtered or unexported fields
}
Cache is a small file-backed store for generated responses, keyed by
repository name, HEAD SHA, provider, and command name. Entries expire
after a caller-supplied max age.
New creates (or opens) a cache rooted at dir. The directory is created with
restrictive permissions if it does not already exist, and any stale temp
files left by interrupted writes are swept.
GetRaw returns the cached raw JSON payload if one exists and is newer than maxAge.
The boolean is false on miss, expired entry, or any read/decode error.