2
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
var ErrRedisKeyNotFound = errors.New("redis key not found")
|
||||
|
||||
type IRedis interface {
|
||||
type RedisCache interface {
|
||||
Encode(a any) ([]byte, error)
|
||||
Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
|
||||
Del(ctx context.Context, keys ...string) error
|
||||
@@ -30,7 +30,7 @@ type redisCache struct {
|
||||
engine *redis.Client
|
||||
}
|
||||
|
||||
var _ IRedis = (*redisCache)(nil)
|
||||
var _ RedisCache = (*redisCache)(nil)
|
||||
|
||||
func New(conf config.Redis) (*redisCache, error) {
|
||||
rdb := redis.NewClient(&redis.Options{
|
||||
|
||||
Reference in New Issue
Block a user