MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / prunePartsWithCache

Function prunePartsWithCache

pkg/filestore/blockstore_cache.go:262–271  ·  view source on GitHub ↗
(dataEntries map[int]*DataCacheEntry, parts []int)

Source from the content-addressed store, hash-verified

260}
261
262func prunePartsWithCache(dataEntries map[int]*DataCacheEntry, parts []int) []int {
263 var rtn []int
264 for _, partIdx := range parts {
265 if dataEntries[partIdx] != nil {
266 continue
267 }
268 rtn = append(rtn, partIdx)
269 }
270 return rtn
271}
272
273func (entry *CacheEntry) loadDataPartsIntoCache(ctx context.Context, parts []int) error {
274 parts = prunePartsWithCache(entry.DataEntries, parts)

Callers 2

loadDataPartsForReadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected