1

I am creating an elasticache client using below snippet

import(
"github.com/aws/aws-sdk-go/service/elasticache"
"github.com/go-redis/redis"
)
// Create a ElastiCache client from just a session.
s, err := session.NewSession(&aws.Config{Region: aws.String(S3_REGION)})
svc := elasticache.New(s)

//I have developed my code using go-redis client

redis.NewClient(&redis.Options{
    Addr:     c.host,
    Password: "",
    DB:       c.dbIndex)

how can I use the elasticache from aws-sdk to work with redis client ? I am very new to this and I am lost .

  • the two packages are for different purposes, `aws-sdk/service/elasticache` is for managing(creating,updating,deleting) your elasticache instance. While `go-redis/redis` package is the right one for you to caching your data into elasticache – cifer Apr 21 '23 at 15:53

0 Answers0