Documentation ¶
Index ¶
- type RedisStore
- func (c *RedisStore) Add(key string, value interface{}, expires time.Duration) error
- func (c *RedisStore) Decrement(key string, delta uint64) (newValue uint64, err error)
- func (c *RedisStore) Delete(key string) error
- func (c *RedisStore) Flush() error
- func (c *RedisStore) Get(key string, ptrValue interface{}) error
- func (c *RedisStore) Increment(key string, delta uint64) (uint64, error)
- func (c *RedisStore) Replace(key string, value interface{}, expires time.Duration) error
- func (c *RedisStore) Set(key string, value interface{}, expires time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
Wraps the Redis client to meet the Cache interface.
func NewRedisCache ¶
func NewRedisCache(host string, password string, defaultExpiration time.Duration) *RedisStore
until redigo supports sharding/clustering, only one host will be in hostList
func (*RedisStore) Add ¶
func (c *RedisStore) Add(key string, value interface{}, expires time.Duration) error
func (*RedisStore) Decrement ¶
func (c *RedisStore) Decrement(key string, delta uint64) (newValue uint64, err error)
func (*RedisStore) Delete ¶
func (c *RedisStore) Delete(key string) error
func (*RedisStore) Flush ¶
func (c *RedisStore) Flush() error
func (*RedisStore) Get ¶
func (c *RedisStore) Get(key string, ptrValue interface{}) error
func (*RedisStore) Increment ¶
func (c *RedisStore) Increment(key string, delta uint64) (uint64, error)
Click to show internal directories.
Click to hide internal directories.