func (r *RedisStorer) ResetExpiry(key string) error {
	return r.client.Expire(key, r.maxAge).Err()
}
ResetExpiry resets the expiry of the key
package abcsessions
import (
	"time"
	"github.com/friendsofgo/errors"
	redis "gopkg.in/redis.v5"
)
type RedisStorer struct {
	maxAge time.Duration
	client *redis.Client
}
func NewDefaultRedisStorer(addr, password string, db int) (*RedisStorer, error) {
	if addr == "" {
		addr = "localhost:6379"
	}
	opts := redis.Options{
		Addr:     addr,
		Password: password,
		DB:       db,
	}
	return NewRedisStorer(opts, time.Hour*24*2)
}
func NewRedisStorer(opts redis.Options, maxAge time.Duration) (*RedisStorer, error) {
	r := &RedisStorer{
		maxAge: maxAge,
		client: redis.NewClient(&opts),
	}
	return r, nil
}
func (r *RedisStorer) All() ([]string, error) {
	var sessions []string
	iter := r.client.Scan(0, "", 0).Iterator()
	for iter.Next() {
		sessions = append(sessions, iter.Val())
	}
	err := iter.Err()
	return sessions, errors.Wrap(err, "unable to iterate redis store")
}
func (r *RedisStorer) Get(key string) (value string, err error) {
	val, err := r.client.Get(key).Result()
	if err == redis.Nil {
		return "", errNoSession{}
	} else if err != nil {
		return "", errors.Wrap(err, "unable to get session")
	}
	return val, nil
}
func (r *RedisStorer) Set(key, value string) error {
	return r.client.Set(key, value, r.maxAge).Err()
}
func (r *RedisStorer) Del(key string) error {
	return r.client.Del(key).Err()
}