1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-11 10:41:01 +00:00

Add additional options to redis session prov

Adding option for frequency of checking timed out connections as well as
an option to specify retries.

These changes make redis provider more stable since connection problems
are becoming fewer.

Since redigo does not have this options and since redis_sentinel and
redis_cluster are using go-redis as a client, this commit changes from
redigo to go-redis for redis session provider.

Added tests for redis session provider as well.
This commit is contained in:
Phillip Stagnet
2020-08-06 11:14:36 +02:00
parent 2fce8f9d1b
commit ec55edfbc4
6 changed files with 189 additions and 94 deletions

4
go.mod
View File

@ -12,8 +12,8 @@ require (
github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a // indirect
github.com/elastic/go-elasticsearch/v6 v6.8.5
github.com/elazarl/go-bindata-assetfs v1.0.0
github.com/go-kit/kit v0.9.0
github.com/go-redis/redis v6.14.2+incompatible
github.com/go-redis/redis/v7 v7.4.0
github.com/go-sql-driver/mysql v1.5.0
github.com/gogo/protobuf v1.1.1
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
@ -31,8 +31,6 @@ require (
github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c // indirect
github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b // indirect
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect
google.golang.org/grpc v1.31.0 // indirect
gopkg.in/yaml.v2 v2.2.8
)