Versions in this module Expand all Collapse all v5 v5.0.5 Sep 5, 2026 v5.0.4 Sep 3, 2026 v5.0.3 Sep 3, 2026 v5.0.2 Sep 3, 2026 v5.0.1 Jul 28, 2026 Changes in this version + const DefaultMaxEntries + func MutateAsync[T any](parseC *Cache, parseKey string, parseOptimistic T, parseFn func() (T, error), ...) + type Cache struct + func New(parseOpts ...Option) *Cache + func (parseC *Cache) Evict(parseKey string) + func (parseC *Cache) EvictAll() + func (parseC *Cache) EvictPrefix(parsePrefix string) + func (parseC *Cache) Inspect() []EntryInfo + func (parseC *Cache) Invalidate(parseKey string) + func (parseC *Cache) InvalidateAll() + func (parseC *Cache) InvalidatePrefix(parsePrefix string) + func (parseC *Cache) Keys() []string + func (parseC *Cache) Peek(parseKey string) (any, bool) + func (parseC *Cache) Set(parseKey string, parseData any) + type EntryInfo struct + Fetching bool + HasData bool + Key string + Stale bool + UpdatedAt time.Time + type Option func(*Cache) + func WithClock(parseNow func() time.Time) Option + func WithMaxEntries(parseMax int) Option + func WithStaleTime(parseD time.Duration) Option + type Result struct + Data T + Err error + Fetching bool + Stale bool + Status Status + UpdatedAt time.Time + func Fetch[T any](parseC *Cache, parseKey string, parseFn func() (T, error)) Result[T] + func Mutate[T any](parseC *Cache, parseKey string, parseOptimistic T, parseFn func() (T, error)) Result[T] + func SWR[T any](parseC *Cache, parseKey string, parseFn func() (T, error), ...) Result[T] + func Snapshot[T any](parseC *Cache, parseKey string) Result[T] + type Status int + const StatusError + const StatusIdle + const StatusLoading + const StatusSuccess + func (parseS Status) String() string Other modules containing this package github.com/monstercameron/GoWebComponents/v4 github.com/monstercameron/GoWebComponents/v6