Documentation
¶
Overview ¶
Package cache fingerprints a group's declared inputs and persists the result so unchanged groups can be skipped on subsequent runs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compute ¶
Compute returns a content fingerprint for the given cache spec. The fingerprint changes when the method, command, params, or any matched input file changes. A glob that matches nothing contributes nothing, so adding the first matching file naturally changes the fingerprint.
func WritesPresent ¶
WritesPresent reports whether every declared output glob matches at least one existing path. A missing output invalidates a would-be cache hit.
Types ¶
type Entry ¶
type Entry struct {
Fingerprint string `json:"fingerprint"`
Result result.RunResult `json:"result"`
Command string `json:"command"`
Params []string `json:"params"`
UpdatedAt time.Time `json:"updatedAt"`
}
Entry is a persisted cache record for one group.
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
FileStore persists one JSON entry per group under a directory.
func NewFileStore ¶
NewFileStore returns a store rooted at dir. The directory is created lazily on the first Save.