Skip to content

Commit

Permalink
Merge pull request #2 from vividvilla/master
Browse files Browse the repository at this point in the history
Use Goredis universal client to accommodate cluster clients
  • Loading branch information
rhnvrm authored Nov 15, 2021
2 parents 3b10957 + 2084c62 commit ef5cb2f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/zerodha/fastcache/v2
module github.com/zerodha/fastcache/v3

go 1.12

Expand Down
6 changes: 3 additions & 3 deletions stores/goredis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"time"

"github.com/go-redis/redis/v8"
"github.com/zerodha/fastcache/v2"
"github.com/zerodha/fastcache/v3"
)

const (
Expand All @@ -34,13 +34,13 @@ const (
// Store is a Redis cache store implementation for fastcache.
type Store struct {
prefix string
cn *redis.Client
cn redis.UniversalClient
ctx context.Context
}

// New creates a new Redis instance. prefix is the prefix to apply to all
// cache keys.
func New(prefix string, client *redis.Client) *Store {
func New(prefix string, client redis.UniversalClient) *Store {
return &Store{
prefix: prefix,
cn: client,
Expand Down
2 changes: 1 addition & 1 deletion stores/goredis/redis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/alicebob/miniredis"
"github.com/go-redis/redis/v8"
"github.com/stretchr/testify/assert"
"github.com/zerodha/fastcache/v2"
"github.com/zerodha/fastcache/v3"
)

func newTestRedis(t *testing.T) *redis.Client {
Expand Down
2 changes: 1 addition & 1 deletion stores/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"time"

"github.com/gomodule/redigo/redis"
"github.com/zerodha/fastcache/v2"
"github.com/zerodha/fastcache/v3"
)

const (
Expand Down

0 comments on commit ef5cb2f

Please sign in to comment.