// CachedResponse returns the cached http.Response for req if present, and nil
// otherwise.
CachedResponse returns the cached http.Response for req if present, and nil
otherwise.
// CachedResponse returns the cached http . Response for req if present and nil // otherwise .
func CachedResponse(c Cache, req *http.Request) (resp *http.Response, err error) {
	cachedVal, ok := c.Get(cacheKey(req))
	if !ok {
		return
	}
	b := bytes.NewBuffer(cachedVal)
	return http.ReadResponse(bufio.NewReader(b), req)
}
func CachedResponse ( c Cache , req * http . Request ) ( resp * http . Response , err error ) { cachedVal , ok := c . Get ( cacheKey ( req ) ) if ! ok { return } b := bytes . NewBuffer ( cachedVal ) return http . ReadResponse ( bufio . NewReader ( b ) , req ) }
CachedResponse returns the cached http.Response for req if present, and nil
otherwise.
CachedResponse returns the cached http . Response for req if present and nil otherwise .