(httpClient *http.Client, ttl time.Duration)
| 133 | } |
| 134 | |
| 135 | func NewCachedHTTPClient(httpClient *http.Client, ttl time.Duration) *http.Client { |
| 136 | newClient := *httpClient |
| 137 | newClient.Transport = AddCacheTTLHeader(httpClient.Transport, ttl) |
| 138 | return &newClient |
| 139 | } |
| 140 | |
| 141 | // AddCacheTTLHeader adds a header to the request telling the cache that the request |
| 142 | // should be cached for a specified amount of time. |
no test coverage detected