MCPcopy Create free account
hub / github.com/divan/txqr / isCached

Method isCached

decode.go:147–155  ·  view source on GitHub ↗

isCached takes the header of chunk data and see if it's been cached. If not, it caches it.

(header string)

Source from the content-addressed store, hash-verified

145// isCached takes the header of chunk data and see if it's been cached.
146// If not, it caches it.
147func (d *Decoder) isCached(header string) bool {
148 if _, ok := d.cache[header]; ok {
149 return true
150 }
151
152 // cache it
153 d.cache[header] = struct{}{}
154 return false
155}

Callers 1

DecodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected