Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[T any] interface { // Get returns the value associated with the key, or an error if not found. Get(ctx context.Context, key string) (T, error) // Set stores a value with the specified key. Set(ctx context.Context, key string, value T, ttl time.Duration) error // Delete removes the specified key/value from the cache. Delete(ctx context.Context, key string) error }
Cache is the main interface for a generic key-value cache.
Click to show internal directories.
Click to hide internal directories.