Categorygithub.com/TheHippo/imagecache
modulepackage
0.1.3
Repository: https://github.com/thehippo/imagecache.git
Documentation: pkg.go.dev

# README

imagecache

# Packages

this the double linked list from https://pkg.go.dev/container/list the only change is, that it uses generics for the value.

# Functions

GetSupportedTypes get a slice of all supported image formats.
Creates a new Cache.
No description provided by the author
NewLastAccessEviction creates a new EvictionStrategy based on the time of the last access.
NewLayer creates a new caching layer with various eviction strategies.
NewMaxCacheSizeEviction creates a new EvictionStrategy which evicts items by their last access when a certain size is reached.
NewMaxItemsEviction create a new EvictionStrategy which evicts items when a certain number of items are in the layer.
NewMemory creates a new in-memory [Storer] or [Cacher].
No description provided by the author
SupportsType check if image format [bimg.ImageType] is supported by the current installation of libvips.

# Constants

Prefixes that help to calculate cache sizes.
Prefixes that help to calculate cache sizes.
Prefixes that help to calculate cache sizes.

# Variables

ErrNotInMemory is returned if an item does not exists in [Memory].

# Structs

Cache caches items.
No description provided by the author
LastAccessEviction evicts items after a certain time not being accessed.
Layer represents a caching layer.
LayerStats contains information about the cache items in the layer - Count of items - Size of items in bytes.
MaxCacheSizeEviction evict items when a certain size is reached.
MaxItemsEviction evict items when a certain number of items is reached.
Memory can be used as a [Storer] or [Cacher].
No description provided by the author

# Interfaces

Cacher is the interface [Cache] expects to cache transformed images to.
No description provided by the author
Storer is the interface [Cache] expects to retrieve items from.

# Type aliases

No description provided by the author