(httpClient *http.Client, ttl time.Duration)
| 163 | } |
| 164 | |
| 165 | func NewCachedHTTPClient(httpClient *http.Client, ttl time.Duration) *http.Client { |
| 166 | newClient := *httpClient |
| 167 | newClient.Transport = AddCacheTTLHeader(httpClient.Transport, ttl) |
| 168 | return &newClient |
| 169 | } |
| 170 | |
| 171 | // AddCacheTTLHeader adds a header to the request telling the cache that the request |
| 172 | // should be cached for a specified amount of time. |
no test coverage detected