Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("key not found")
ErrNotFound indicates that key not found in the store.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface {
Get(ctx context.Context, key string) ([]byte, error)
Set(ctx context.Context, key string, data []byte) error
Delete(ctx context.Context, key string) error
Clear(ctx context.Context) error
}
Store is the interface implemented by types that can be data storage for cache.
func BigcacheStore ¶ added in v0.0.8
BigcacheStore creates a Bigcache data store.
func MapStore ¶
MapStore creates a store that is like a Go map but is safe for concurrent use by multiple goroutines.
func RedisStore ¶ added in v0.0.8
RedisStore creates a Redis data store.
Click to show internal directories.
Click to hide internal directories.