Documentation ¶
Index ¶
- type Redis
- func (cache *Redis) DeleteKeys(keys ...string) error
- func (cache *Redis) ExpireKey(key string) error
- func (cache *Redis) FlushData() error
- func (cache *Redis) GetInstance() *redis.Client
- func (cache *Redis) GetValue(key string) (string, error)
- func (cache *Redis) SetValue(key string, value interface{}, expiration time.Duration) error
- type RedisConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redis ¶
Redis contains objects for database communication.
func NewRedis ¶
func NewRedis(config *RedisConfig) (*Redis, error)
NewRedis create new cache instance.
func (*Redis) DeleteKeys ¶
type RedisConfig ¶
RedisConfig contains the configurations for cache.
func NewRedisConfig ¶
func NewRedisConfig() *RedisConfig
NewRedisConfig load the configuration for database.
Click to show internal directories.
Click to hide internal directories.