Versions in this module Expand all Collapse all v0 v0.0.1 Jan 11, 2025 Changes in this version + func GenerateRequestHash(req *http.Request) (string, error) + type Cache interface + Get func(ctx context.Context, key string) ([]byte, error) + Set func(ctx context.Context, key string, value []byte) error + type CacheMiddleware struct + func New(cache Cache, opts ...Option) *CacheMiddleware + func (m *CacheMiddleware) RoundTripper(next http.RoundTripper) http.RoundTripper + type CacheWithTTL interface + SetWithTTL func(ctx context.Context, key string, value []byte, ttl time.Duration) error + type KeyGenerator interface + Key func(req *http.Request) (string, error) + type Option func(*CacheMiddleware) + func WithCacheableReq(f func(req *http.Request) bool) Option + func WithTTL(ttl time.Duration) Option