MCPcopy Create free account
hub / github.com/easyp-tech/server / missCached

Method missCached

internal/connect/commits.go:948–953  ·  view source on GitHub ↗

missCached reports whether sha was recently confirmed absent from every configured source (within ProbeNegativeTTL). Caller must NOT hold commitMu.

(sha string)

Source from the content-addressed store, hash-verified

946// missCached reports whether sha was recently confirmed absent from every
947// configured source (within ProbeNegativeTTL). Caller must NOT hold commitMu.
948func (h *commitServiceHandler) missCached(sha string) bool {
949 h.commitMu.RLock()
950 t, ok := h.missCache[sha]
951 h.commitMu.RUnlock()
952 return ok && time.Since(t) < h.probeNegativeTTL
953}
954
955func (h *commitServiceHandler) rememberMiss(sha string) {
956 h.commitMu.Lock()

Calls

no outgoing calls