Versions in this module Expand all Collapse all v0 v0.5.0 Oct 10, 2019 Changes in this version + const XFromCache + var ErrNoDateHeader = errors.New("no Date header") + func CachedResponse(c Cache, req *http.Request) (resp *http.Response, err error) + func Date(respHeaders http.Header) (date time.Time, err error) + type Cache interface + Delete func(key string) + Get func(key string) (responseBytes []byte, ok bool) + Set func(key string, responseBytes []byte) + type MemoryCache struct + func NewMemoryCache() *MemoryCache + func (c *MemoryCache) Delete(key string) + func (c *MemoryCache) Get(key string) (resp []byte, ok bool) + func (c *MemoryCache) Set(key string, resp []byte) + type Transport struct + Cache Cache + MarkCachedResponses bool + Transport http.RoundTripper + func NewMemoryCacheTransport() *Transport + func NewTransport(c Cache) *Transport + func (t *Transport) Client() *http.Client + func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error)