Documentation
¶
Index ¶
- type RedisStore
- func (c *RedisStore) Add(key string, value interface{}, expires time.Duration) error
- func (c *RedisStore) Decrement(key string, delta int64) (newValue int64, err error)
- func (c *RedisStore) Delete(key string) error
- func (c *RedisStore) Expire(key string, expires time.Duration) (bool, error)
- func (c *RedisStore) Flush() error
- func (c *RedisStore) Get(key string, ptrValue interface{}) error
- func (c *RedisStore) Increment(key string, delta int64) (int64, 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
}
func NewRedisCache ¶
func NewRedisCache(host string, password string, defaultExpiration time.Duration) *RedisStore
NewRedisCache returns a 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
Add (see CacheStore interface)
func (*RedisStore) Decrement ¶
func (c *RedisStore) Decrement(key string, delta int64) (newValue int64, err error)
Decrement (see CacheStore interface)
func (*RedisStore) Delete ¶
func (c *RedisStore) Delete(key string) error
Delete (see CacheStore interface)
func (*RedisStore) Get ¶
func (c *RedisStore) Get(key string, ptrValue interface{}) error
Get (see CacheStore interface)
func (*RedisStore) Increment ¶
func (c *RedisStore) Increment(key string, delta int64) (int64, error)
Increment (see CacheStore interface)
Click to show internal directories.
Click to hide internal directories.