Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// ErrKeyNotFound is an alias for redis.Nil
ErrKeyNotFound = redis.Nil
)
Functions ¶
func NewRedisStore ¶
NewRedisStore returns a new cache.Store which is implemented by redis cache.
Types ¶
type Store ¶
type Store interface { // Get gets the record with id from the cache. Get(ctx context.Context, id int64) (*record.ShortURL, error) // Set sets the record with id to the cache. Set(ctx context.Context, id int64, record *record.ShortURL) error }
Store defines the interface for url_shortener cache store.
Click to show internal directories.
Click to hide internal directories.