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