MCPcopy Create free account
hub / github.com/PostHog/duckgres / shouldCache

Method shouldCache

cmd/cache-proxy/proxy.go:127–141  ·  view source on GitHub ↗

shouldCache returns true if the request targets a host we want to cache. When no suffixes are configured, all GETs are cached (legacy behavior).

(r *http.Request)

Source from the content-addressed store, hash-verified

125 sf.mu.Unlock()
126 c.wg.Wait()
127 return c.res, c.err
128 }
129 c := &call{start: time.Now()}
130 c.wg.Add(1)
131 sf.m[key] = c
132 sf.mu.Unlock()
133
134 c.res, c.err = fn()
135 c.wg.Done()
136
137 sf.mu.Lock()
138 delete(sf.m, key)
139 sf.mu.Unlock()
140
141 return c.res, c.err
142}
143
144// InFlight reports whether a fill for key is currently executing, and how

Callers 1

HandleProxyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected