missCached reports whether sha was recently confirmed absent from every configured source (within ProbeNegativeTTL). Caller must NOT hold commitMu.
(sha string)
| 946 | // missCached reports whether sha was recently confirmed absent from every |
| 947 | // configured source (within ProbeNegativeTTL). Caller must NOT hold commitMu. |
| 948 | func (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 | |
| 955 | func (h *commitServiceHandler) rememberMiss(sha string) { |
| 956 | h.commitMu.Lock() |
no outgoing calls