Skip to content

Commit 65bb98f

Browse files
Upgrade Redis client to v9 (kataras#2102)
Signed-off-by: Gerasimos (Makis) Maropoulos <kataras2006@hotmail.com> Co-authored-by: Gerasimos (Makis) Maropoulos <kataras2006@hotmail.com>
1 parent bbe3da7 commit 65bb98f

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

go.mod

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ require (
1515
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385
1616
github.com/fatih/structs v1.1.0
1717
github.com/flosch/pongo2/v4 v4.0.2
18-
github.com/go-redis/redis/v8 v8.11.5
1918
github.com/golang/snappy v0.0.4
2019
github.com/google/uuid v1.3.0
2120
github.com/gorilla/securecookie v1.1.1
@@ -33,6 +32,7 @@ require (
3332
github.com/mailgun/raymond/v2 v2.0.48
3433
github.com/mailru/easyjson v0.7.7
3534
github.com/microcosm-cc/bluemonday v1.0.23
35+
github.com/redis/go-redis/v9 v9.0.2
3636
github.com/russross/blackfriday/v2 v2.1.0
3737
github.com/schollz/closestmatch v2.1.0+incompatible
3838
github.com/shirou/gopsutil/v3 v3.23.2
@@ -55,7 +55,7 @@ require (
5555
github.com/ajg/form v1.5.1 // indirect
5656
github.com/aymerick/douceur v0.2.0 // indirect
5757
github.com/cespare/xxhash v1.1.0 // indirect
58-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
58+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
5959
github.com/davecgh/go-spew v1.1.1 // indirect
6060
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect
6161
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect
@@ -83,6 +83,7 @@ require (
8383
github.com/nats-io/nats.go v1.23.0 // indirect
8484
github.com/nats-io/nkeys v0.3.0 // indirect
8585
github.com/nats-io/nuid v1.0.1 // indirect
86+
github.com/nxadm/tail v1.4.8 // indirect
8687
github.com/pkg/errors v0.8.1 // indirect
8788
github.com/pmezard/go-difflib v1.0.0 // indirect
8889
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect

go.sum

+9-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

middleware/jwt/blocklist/redis/blocklist.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/kataras/iris/v12/core/host"
99
"github.com/kataras/iris/v12/middleware/jwt"
1010

11-
"github.com/go-redis/redis/v8"
11+
"github.com/redis/go-redis/v9"
1212
)
1313

1414
var defaultContext = context.Background()
@@ -138,7 +138,7 @@ func (b *Blocklist) ValidateToken(token []byte, c jwt.Claims, err error) error {
138138
// InvalidateToken invalidates a verified JWT token.
139139
func (b *Blocklist) InvalidateToken(token []byte, c jwt.Claims) error {
140140
key := b.GetKey(token, c)
141-
return b.client.SetEX(defaultContext, key, token, c.Timeleft()).Err()
141+
return b.client.SetEx(defaultContext, key, token, c.Timeleft()).Err()
142142
}
143143

144144
// Del removes a token from the storage.

sessions/sessiondb/redis/driver_goredis.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"strconv"
77
"time"
88

9-
"github.com/go-redis/redis/v8"
9+
"github.com/redis/go-redis/v9"
1010
)
1111

1212
type (
@@ -17,7 +17,7 @@ type (
1717
)
1818

1919
// GoRedisClient is the interface which both
20-
// go-redis' Client and Cluster Client implements.
20+
// go-redis's Client and Cluster Client implements.
2121
type GoRedisClient interface {
2222
redis.Cmdable // Commands.
2323
io.Closer // CloseConnection.

0 commit comments

Comments
 (0)