Versions in this module Expand all Collapse all v0 v0.28.2 Nov 14, 2026 v0.28.1 Nov 14, 2026 Changes in this version + const DefaultMaxBodyBytes + func Key(method, host, uri string) string + type Cache struct + func FromMetadata(store cache.Cache, md mdata.Metadata) *Cache + func New(store cache.Cache, policy Policy) *Cache + func (c *Cache) Cacheable(req *http.Request, resp *http.Response) bool + func (c *Cache) CacheableRequest(req *http.Request) bool + func (c *Cache) Lookup(ctx context.Context, req *http.Request) (resp *http.Response, stale bool, ok bool) + func (c *Cache) MaxBodyBytes() int + func (c *Cache) ServeStale() bool + func (c *Cache) Store(ctx context.Context, req *http.Request, data []byte, status int) error + func (c *Cache) StoreKey(ctx context.Context, key string, data []byte, status int) error + func (c *Cache) TTLFor(status int) time.Duration + func (c *Cache) TeeWriter(w io.Writer) *TeeWriter + type Policy struct + DefaultTTL time.Duration + MaxBodyBytes int + Methods map[string]bool + ServeStale bool + StatusTTL map[int]time.Duration + type TeeWriter struct + func (t *TeeWriter) Captured() []byte + func (t *TeeWriter) Write(p []byte) (int, error)