(httpClient *http.Client, ttl time.Duration)
| 184 | } |
| 185 | |
| 186 | func 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. |
no test coverage detected