Documentation ¶
Index ¶
- func NewRedisCache(read, write *redis.Pool) interfaces.Cache
- type RedisCache
- func (r *RedisCache) Delete(ctx context.Context, key string) error
- func (r RedisCache) Exists(ctx context.Context, key string) (bool, error)
- func (r *RedisCache) Get(ctx context.Context, key string) (data []byte, err error)
- func (r *RedisCache) GetKeys(ctx context.Context, pattern string) ([]string, 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 ¶
func NewRedisCache ¶
func NewRedisCache(read, write *redis.Pool) interfaces.Cache
NewRedisCache constructor
Types ¶
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
RedisCache redis
func (*RedisCache) Delete ¶
func (r *RedisCache) Delete(ctx context.Context, key string) error
Delete method
func (RedisCache) Exists ¶
Exists method
func (*RedisCache) Get ¶
Get method
func (*RedisCache) GetKeys ¶
GetKeys method
Click to show internal directories.
Click to hide internal directories.