Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { // GetOrSet will fetch the value at 'key' as []byte and encode it into into. If key does not exist, it will call the // data function for []byte, store that into key, and decode it into into GetOrSet(ctx context.Context, key []byte, ttl time.Duration, into interface{}, data func(ctx context.Context) (interface{}, error)) error // Delete the cached value at key Delete(ctx context.Context, key []byte) error }
type InMemoryCache ¶
type InMemoryCache struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.