()
| 54 | } |
| 55 | |
| 56 | func ParseRedisOption() *redis.Options { |
| 57 | opt, err := redis.ParseURL(os.Getenv("REDIS_CONN_STRING")) |
| 58 | if err != nil { |
| 59 | FatalLog("failed to parse Redis connection string: " + err.Error()) |
| 60 | } |
| 61 | return opt |
| 62 | } |
| 63 | |
| 64 | func RedisSet(key string, value string, expiration time.Duration) error { |
| 65 | if DebugEnabled { |