Versions in this module Expand all Collapse all v0 v0.15.0 Oct 16, 2023 Changes in this version + func WithDefaultDuration[K comparable, V any](duration time.Duration) trcache.RootOption + func WithKeyCodec[K comparable, V any](keyCodec trcache.KeyCodec[K]) trcache.RootOption + func WithValidator[K comparable, V any](validator trcache.Validator[V]) trcache.RootOption + func WithValueCodec[K comparable, V any](valueCodec trcache.Codec[V]) trcache.RootOption + type Cache struct + func New[K comparable, V any](cache *bigcache.BigCache, options ...trcache.RootOption) (*Cache[K, V], error) + func (c *Cache[K, V]) Delete(ctx context.Context, key K, options ...trcache.DeleteOption) error + func (c *Cache[K, V]) Get(ctx context.Context, key K, options ...trcache.GetOption) (V, error) + func (c *Cache[K, V]) Handle() *bigcache.BigCache + func (c *Cache[K, V]) Name() string + func (c *Cache[K, V]) Set(ctx context.Context, key K, value V, options ...trcache.SetOption) error + type RefreshCache struct + func NewRefresh[K comparable, V any](cache *bigcache.BigCache, options ...trcache.RootOption) (*RefreshCache[K, V], error) + func (c *RefreshCache[K, V]) GetOrRefresh(ctx context.Context, key K, options ...trcache.RefreshOption) (V, error)