We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d18cca commit 86b261cCopy full SHA for 86b261c
rcache.go
@@ -38,7 +38,10 @@ func New(redisURL string, logger logger) *Cache {
38
39
if redisURL == "" {
40
opts.Host = os.Getenv("REDISHOST")
41
- opts.Port = os.Getenv("REDISPORT")
+ i, err := strconv.Atoi(os.Getenv("REDISPORT") + "")
42
+ if err == nil {
43
+ opts.Port = i
44
+ }
45
} else {
46
opts = &xredis.Options{}
47
u, err := url.Parse(redisURL)
0 commit comments