Documentation ¶
Index ¶
- Constants
- type RedisConn
- func (c *RedisConn) Close()
- func (c *RedisConn) Forget(key string) error
- func (c *RedisConn) ForgetAll() error
- func (c *RedisConn) Get(key string) (_ interface{}, found bool, _ error)
- func (c *RedisConn) Set(key string, expiration time.Duration, itemToStore interface{}) error
- func (c *RedisConn) StorePointer() bool
- type RedisStore
Constants ¶
View Source
const NoExpiration time.Duration = -1
NoExpiration is used to indicate that data should not expire from the cache.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisConn ¶
type RedisConn struct {
// contains filtered or unexported fields
}
RedisConn represents a single connection to the redis pool.
func (*RedisConn) Close ¶
func (c *RedisConn) Close()
Close returns the connection back to the pool for storage drivers that utilize a pool.
func (*RedisConn) StorePointer ¶
StorePointer sets whether a storage driver requires itemToStore to be stored as a pointer or as a concrete value.
type RedisStore ¶
RedisStore is used to create a redis-backed cache.
func NewRedisStore ¶
func NewRedisStore(redisPool *redis.Pool) *RedisStore
NewRedisStore creates a redis-backed cache directly from a redis pool object.
Click to show internal directories.
Click to hide internal directories.