From e12d08fb7affb20165bf483ddf4914ac8c523139 Mon Sep 17 00:00:00 2001 From: Joel Rose Date: Wed, 15 Mar 2023 23:05:40 +0200 Subject: [PATCH] fix: expire keys set through the redigo libary --- adapter/adapter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapter/adapter.go b/adapter/adapter.go index b80d346..74cb498 100644 --- a/adapter/adapter.go +++ b/adapter/adapter.go @@ -71,7 +71,7 @@ func (a *RedigoAdapter) Set(ctx context.Context, key string, value interface{}, } defer conn.Close() - _, err = redigo.DoContext(conn, ctx, "SET", key, value) + _, err = redigo.DoContext(conn, ctx, "SET", key, value, "EX", int(expiration.Seconds())) if err != nil { return fmt.Errorf("setting value in redis: %v", err) }