Versions in this module Expand all Collapse all v0 v0.26.1 May 11, 2026 v0.26.0 May 11, 2026 Changes in this version + type Cache struct + func NewCache(opts CacheOptions) *Cache + func (c *Cache) Bytes() int64 + func (c *Cache) Clear() + func (c *Cache) Get(key string) (image.Image, bool) + func (c *Cache) Len() int + func (c *Cache) Put(key string, img image.Image) + func (c *Cache) Remove(key string) + type CacheOptions struct + MaxBytes int64 + MaxEntries int + type DiskCache struct + func NewDiskCache(dir string, maxBytes int64) (*DiskCache, error) + func (d *DiskCache) Clear() error + func (d *DiskCache) Get(key string) (io.ReadCloser, bool) + func (d *DiskCache) Put(key string, data []byte) error + func (d *DiskCache) Remove(key string) + type HTTPError struct + StatusCode int + URL string + func (e *HTTPError) Error() string + type LoadOptions struct + Headers map[string]string + type LoadResult struct + Err error + Image image.Image + type Loader struct + func DefaultLoader() *Loader + func NewLoader(opts LoaderOptions) *Loader + func (l *Loader) ClearCache() error + func (l *Loader) Evict(url string) + func (l *Loader) Load(url string, opts LoadOptions, callback func(LoadResult)) (cancel func()) + type LoaderOptions struct + Client *http.Client + DiskCache *DiskCache + MemoryCache *Cache