Versions in this module Expand all Collapse all v10 v10.1.0 Aug 15, 2026 v10.0.0 Aug 12, 2026 Changes in this version + const NoExpiry + var ErrNamespaceRequired = errors.New("operation requires a configured key namespace") + var ErrNotFound = errors.New("not found") + var ErrUnavailable = errors.New("cache is unavailable") + func EffectiveExpiry(defaultExpiry time.Duration, opts ...WriteOption) time.Duration + type CBORCodec struct + func NewCBORCodec[T any]() CBORCodec[T] + func NewDefaultCodec[T any]() CBORCodec[T] + func (CBORCodec[T]) Decode(data []byte) (*T, error) + func (CBORCodec[T]) Encode(value *T) ([]byte, error) + type Cache interface + Close func() error + Delete func(ctx context.Context, key string) error + DeleteByPrefix func(ctx context.Context, prefix string) error + DeleteMany func(ctx context.Context, keys []string) error + Flush func(ctx context.Context) error + Get func(ctx context.Context, key string) (*T, error) + GetMany func(ctx context.Context, keys []string) (map[string]*T, error) + Ping func(ctx context.Context) error + Set func(ctx context.Context, key string, value *T, opts ...WriteOption) error + SetIfPresent func(ctx context.Context, key string, value *T, opts ...WriteOption) error + SetMany func(ctx context.Context, items map[string]*T, opts ...WriteOption) error + type Codec interface + Decode func(data []byte) (*T, error) + Encode func(value *T) ([]byte, error) + type GobCodec struct + func NewGobCodec[T any]() GobCodec[T] + func (GobCodec[T]) Decode(data []byte) (*T, error) + func (GobCodec[T]) Encode(value *T) ([]byte, error) + type WriteConfig struct + Expiry time.Duration + type WriteOption func(*WriteConfig) + func WithExpiry(expiry time.Duration) WriteOption Other modules containing this package github.com/primandproper/platform-go github.com/primandproper/platform-go/v11 github.com/primandproper/platform-go/v12 github.com/primandproper/platform-go/v2 github.com/primandproper/platform-go/v3 github.com/primandproper/platform-go/v4 github.com/primandproper/platform-go/v5 github.com/primandproper/platform-go/v6 github.com/primandproper/platform-go/v7 github.com/primandproper/platform-go/v8 github.com/primandproper/platform-go/v9