Versions in this module Expand all Collapse all v0 v0.1.0 Jul 8, 2026 Changes in this version + const DefaultCleanupInterval + const DefaultExpiration + const NoExpiration + const OneHourExpiration + const PrefixConnection + const PrefixDefault + const PrefixNode + const PrefixThread + const ShortExpiration + var ErrCacheAlreadyExists = errors.New("cache already exists") + func Add(key string, prefix string, data any, expiration time.Duration) error + func Delete(key string, prefix string) + func Flush() + func GetValue[T any](key string, prefix string) (T, bool) + func Get[T any](key string, prefix string) *T + func ListByPrefix[T any](prefix string) []*T + func ListValuesByPrefix[T any](prefix string) []T + func NewCache(opts *Options) + func Set(key string, prefix string, data any, expiration time.Duration) + func SetValue[T any](key string, prefix string, data T, expiration time.Duration) + type Options struct + CleanupInterval time.Duration + Expiration time.Duration