Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoCacheEntry = errors.New("httpcache: no cache entry")
Functions ¶
This section is empty.
Types ¶
type RoundTripper ¶
type RoundTripper struct {
// Transport is the next RoundTripper in the chain. It is used for cache
// misses and requests that bypass the cache. If nil, http.DefaultTransport
// is used.
Transport http.RoundTripper
// DefaultCacheTTL defines how long an otherwise cacheable response is
// considered fresh when no expiration time can be derived from its HTTP
// headers. A non-positive value prevents storing such responses.
DefaultCacheTTL time.Duration
// UncacheableVaryHeaders lists request field names for which a response must
// not be stored when the origin names one of them in Vary. The fields are not
// ignored: ignoring an origin-provided Vary field would permit an incorrect
// cache hit. This option is useful for volatile fields such as Signature,
// Signature-Input or traceparent.
UncacheableVaryHeaders []string
}
Click to show internal directories.
Click to hide internal directories.