Documentation
¶
Overview ¶
Package httpcache provides a cache enabled http Transport.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface { // Generates the cache key for the given http.Request. An empty string will // disable caching. Key(req *http.Request) string // Provides the max cache age for the given request/response pair. A zero // value will disable caching for the pair. The request is available via // res.Request. MaxAge(res *http.Response) time.Duration }
func CacheByPath ¶
This caches against the host + path (ignoring scheme, auth, query etc) for the specified duration.
func CacheByURL ¶
This caches against the entire URL for the specified duration.
Click to show internal directories.
Click to hide internal directories.