Documentation
¶
Index ¶
- type Config
- type RedisCache
- func (rc *RedisCache) Delete(ctx context.Context, key string) error
- func (rc *RedisCache) Disconnect() error
- func (rc *RedisCache) Get(ctx context.Context, key string) (interface{}, error)
- func (rc *RedisCache) GetByPattern(ctx context.Context, keyPattern string) (map[string]interface{}, error)
- func (rc *RedisCache) Set(ctx context.Context, key string, value string, ttl time.Duration) 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 holds the handler for the redisclient and auxiliary info
func NewCache ¶
func NewCache(config *Config) (*RedisCache, error)
NewRedisClient inits a RedisCache instance
func (*RedisCache) Delete ¶
func (rc *RedisCache) Delete(ctx context.Context, key string) error
Delete - deletes a key from redis
func (*RedisCache) Disconnect ¶
func (rc *RedisCache) Disconnect() error
Disconnect ... disconnects from the redis server
func (*RedisCache) Get ¶
func (rc *RedisCache) Get(ctx context.Context, key string) (interface{}, error)
Get - gets a value from redis
func (*RedisCache) GetByPattern ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.