Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("key not found")
)
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[T any] interface { Set(ctx context.Context, key string, value T) error SetWithTTL(ctx context.Context, key string, value T, ttl time.Duration) error Delete(ctx context.Context, key string) error Get(ctx context.Context, key string) (T, error) GetAll(ctx context.Context, selectFunc Matcher) (map[string]T, error) UpdateTTL(ctx context.Context, key string, ttl time.Duration) error }
Cache is an interface for a cache that can be used to store and retrieve values.
Click to show internal directories.
Click to hide internal directories.