Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyNotFound = errors.New("key not found") ErrKeyExpired = errors.New("key expired") )
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { PutKey(ctx context.Context, key string, value any) error PutKeyTTL(ctx context.Context, key string, value any, ttl time.Duration) error GetKey(ctx context.Context, key string, receiver any) error GetAndDeleteKey(ctx context.Context, key string, receiver any) error DeleteKey(ctx context.Context, key string) error }
func NewInMemoryCache ¶
func NewInMemoryCache() Cache
Click to show internal directories.
Click to hide internal directories.