Versions in this module Expand all Collapse all v1 v1.1.0 Dec 2, 2025 Changes in this version + const DefaultTTL + const HeaderKey + func Middleware(store Store, ttl time.Duration) func(http.Handler) http.Handler + type MemoryStore struct + func NewMemoryStore() *MemoryStore + func NewMemoryStoreWithSize(maxSize int) *MemoryStore + func (s *MemoryStore) Delete(ctx context.Context, key string) error + func (s *MemoryStore) Get(ctx context.Context, key string) (*Response, bool) + func (s *MemoryStore) Set(ctx context.Context, key string, response *Response, ttl time.Duration) error + func (s *MemoryStore) Stop() + type Response struct + Body []byte + CachedAt time.Time + Headers map[string]string + StatusCode int + type Store interface + Delete func(ctx context.Context, key string) error + Get func(ctx context.Context, key string) (*Response, bool) + Set func(ctx context.Context, key string, response *Response, ttl time.Duration) error