Documentation ¶
Index ¶
- type RedisCache
- func (r *RedisCache) Delete(ctx context.Context, key string) (err error)
- func (r RedisCache) Exists(ctx context.Context, key string) (exist bool, err error)
- func (r *RedisCache) Get(ctx context.Context, key string) (data []byte, err error)
- func (r *RedisCache) GetKeys(ctx context.Context, pattern string) (data []string, err error)
- func (r *RedisCache) GetTTL(ctx context.Context, key string) (dur time.Duration, err error)
- func (r *RedisCache) Set(ctx context.Context, key string, value interface{}, expire time.Duration) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
RedisCache redis implement interfaces.Cache
func NewRedisCache ¶
func NewRedisCache(read, write *redis.Pool) *RedisCache
NewRedisCache constructor
func (*RedisCache) Delete ¶
func (r *RedisCache) Delete(ctx context.Context, key string) (err error)
Delete method with pattern
Click to show internal directories.
Click to hide internal directories.