Documentation
¶
Overview ¶
Package cache defines the content-hash finding cache (PRD section 15, optimization 2). Each file (and optionally each function) is hashed; if the hash is unchanged since the last run, its findings are reused instead of recomputed, so a recurring full scan costs about the same as an incremental.
Cache hashes file content with SHA-256 and stores the findings for each hash as a JSON file under its directory, so unchanged files reuse their findings instead of being recomputed.
Status: INERT. Built and tested, but not yet wired to any consumer. The MCP orchestrator will use it in Fase 1; kept in the core per PRD section 15.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
Dir string
}
Cache stores findings keyed by a file's content hash under Dir (default .codefit/cache). A cache hit means the file content is unchanged, so its findings can be reused instead of recomputed (PRD §15, optimization 2).
func (*Cache) Get ¶
Get returns the cached findings for a content hash and whether they were present. A missing or unreadable entry is treated as a miss.