Versions in this module Expand all Collapse all v0 v0.1.0 Nov 9, 2026 Changes in this version + const MaxBytes + var ErrNotImage = errors.New("imagecache: not an image") + type Cache struct + func New(dir string) *Cache + func (c *Cache) Get(ctx context.Context, rawURL string) (Image, error) + func (c *Cache) GetFresh(ctx context.Context, key string, maxAge time.Duration, fetch Fetcher) (Image, error) + func (c *Cache) GetWith(ctx context.Context, key string, fetch Fetcher) (Image, error) + func (c *Cache) SetHTTPClient(hc *http.Client) + type Fetcher func(ctx context.Context) (contentType string, body io.Reader, err error) + type Image struct + ContentType string + ModTime time.Time + Path string + type Signer struct + func LoadSigner(ctx context.Context, st *store.Store) (*Signer, error) + func NewSigner(key []byte) *Signer + func (s *Signer) Sign(parts ...string) string + func (s *Signer) Verify(sig string, parts ...string) bool