Documentation ¶ Index ¶ func CopyResponse(resp *http.Response) *http.Response func CreateCacheKey(req *http.Request) string type Cache func NewCache(ttl, cleanWindow time.Duration, maxCacheSizeMB int) (Cache, error) func NewNopCache() Cache Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func CopyResponse ¶ func CopyResponse(resp *http.Response) *http.Response func CreateCacheKey ¶ func CreateCacheKey(req *http.Request) string Types ¶ type Cache ¶ type Cache interface { Get(key string) *http.Response Set(key string, value *http.Response) Delete(key string) Clear() } func NewCache ¶ func NewCache(ttl, cleanWindow time.Duration, maxCacheSizeMB int) (Cache, error) func NewNopCache ¶ func NewNopCache() Cache Source Files ¶ View all Source files cache.go go-cache.go nop-cache.go Click to show internal directories. Click to hide internal directories.