MCPcopy Create free account
hub / github.com/Facets-cloud/flow / Save

Method Save

internal/stats/cache.go:36–42  ·  view source on GitHub ↗

Save writes the cache as JSON.

(path string)

Source from the content-addressed store, hash-verified

34
35// Save writes the cache as JSON.
36func (c *Cache) Save(path string) error {
37 data, err := json.Marshal(c)
38 if err != nil {
39 return err
40 }
41 return os.WriteFile(path, data, 0o644)
42}
43
44// ScanFile returns the rollup for a jsonl file, reusing the cached result
45// when the file's mod time and size are unchanged.

Callers 2

cmdStatsFunction · 0.80

Calls

no outgoing calls

Tested by 1