MCPcopy Index your code
hub / github.com/larksuite/cli / loadCacheMeta

Function loadCacheMeta

internal/registry/remote.go:132–142  ·  view source on GitHub ↗

--- cache I/O ---

()

Source from the content-addressed store, hash-verified

130// --- cache I/O ---
131
132func loadCacheMeta() (CacheMeta, error) {
133 var cm CacheMeta
134 data, err := vfs.ReadFile(cacheMetaPath())
135 if err != nil {
136 return cm, err
137 }
138 if err = json.Unmarshal(data, &cm); err != nil {
139 return cm, err
140 }
141 return cm, nil
142}
143
144func saveCacheMeta(cm CacheMeta) error {
145 if err := vfs.MkdirAll(cacheDir(), 0700); err != nil {

Callers 2

InitWithBrandFunction · 0.85
doBackgroundRefreshFunction · 0.85

Calls 2

ReadFileFunction · 0.92
cacheMetaPathFunction · 0.85

Tested by

no test coverage detected