Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[Entity any] interface { Entries( ctx context.Context, ) (map[string]Entity, error) Keys( ctx context.Context, ) ([]string, error) Values( ctx context.Context, ) ([]Entity, error) Set( ctx context.Context, key string, value Entity, retention time.Duration, ) error Get( ctx context.Context, key string, ) (*Entity, error) Remove( ctx context.Context, key string, ) error RemainingRetention( ctx context.Context, key string, ) (time.Duration, error) }
func NewMemoryCache ¶
func NewRedisCache ¶
Click to show internal directories.
Click to hide internal directories.