Versions in this module Expand all Collapse all v0 v0.18.0 Oct 7, 2026 Changes in this version + func Key(req *http.Request) string + type Entry struct + Body []byte + ETag string + Header http.Header + LastModified string + type FileStore struct + func NewFileStore(dir string) (*FileStore, error) + func (s *FileStore) Dir() string + func (s *FileStore) Get(key string) (*Entry, error) + func (s *FileStore) Set(key string, entry *Entry) error + type MemoryStore struct + func NewMemoryStore(maxEntries int) *MemoryStore + func (s *MemoryStore) Get(key string) (*Entry, error) + func (s *MemoryStore) Len() int + func (s *MemoryStore) Set(key string, entry *Entry) error + type Stats struct + Hits int64 + Misses int64 + Requests int64 + Uncacheable int64 + func (s Stats) String() string + type Store interface + Get func(key string) (*Entry, error) + Set func(key string, entry *Entry) error + type Transport struct + Next http.RoundTripper + OnStoreError func(err error) + Store Store + func NewTransport(next http.RoundTripper) *Transport + func NewTransportWithStore(next http.RoundTripper, store Store) *Transport + func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) + func (t *Transport) Stats() Stats