MCPcopy Create free account
hub / github.com/cli/cli / NewCachedHTTPClient

Function NewCachedHTTPClient

api/http_client.go:186–190  ·  view source on GitHub ↗
(httpClient *http.Client, ttl time.Duration)

Source from the content-addressed store, hash-verified

184}
185
186func NewCachedHTTPClient(httpClient *http.Client, ttl time.Duration) *http.Client {
187 newClient := *httpClient
188 newClient.Transport = AddCacheTTLHeader(httpClient.Transport, ttl)
189 return &newClient
190}
191
192// AddCacheTTLHeader adds a header to the request telling the cache that the request
193// should be cached for a specified amount of time.

Callers 15

extensionManagerFunction · 0.92
listRunFunction · 0.92
CapiClientFuncFunction · 0.92
NewCmdListFunction · 0.92
viewRunFunction · 0.92
listRunFunction · 0.92
createRunFunction · 0.92
editRunFunction · 0.92
listRunFunction · 0.92
editRunFunction · 0.92
checksRunFunction · 0.92
listRunFunction · 0.92

Calls 1

AddCacheTTLHeaderFunction · 0.85

Tested by

no test coverage detected