Documentation ¶
Index ¶
- func New(conf Config) (*Redis, Error)
- type Config
- type Redis
- func (r *Redis) Cleanup() Error
- func (r *Redis) Clear() Error
- func (r *Redis) ClearTag(tag string) Error
- func (r *Redis) Delete(keys ...string) Error
- func (r *Redis) Get(key string, items ...kit.CacheItem) (kit.CacheItem, Error)
- func (r *Redis) GetString(key string) (string, Error)
- func (r *Redis) Keys() ([]string, Error)
- func (r *Redis) KeysByTags(matchTags ...string) ([]string, Error)
- func (r *Redis) Name() string
- func (r *Redis) Set(item kit.CacheItem) Error
- func (r *Redis) SetString(key string, value string, expiresAt *time.Time, tags []string) Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Redis network address, like localhost:6379 Address string DialOptions []redis.DialOption // Prefix under which all keys will be stored. Prefix string // Maximum number of idle connections in the connection pool. MaxIdleConnections int // Timeout for idle connections in the pool in seconds. IdleConnectionTimeout int // Number of maximum active connections. MaxActiveConnections int // If true, wait until a connection becomes available instead of returning an // error. WaitForConnection bool // Password for redis authentication. Password string }
Click to show internal directories.
Click to hide internal directories.