How use below Redis command in GoLang using redisgo.
127.0.0.1:6379> set hello 1 EX 10
OK
127.0.0.1:6379>
I have tried using below,
_, err = conn.Do("EXPIRE", key, ttl)
Is there any way to set ttl, when setting the key?
conn.Do("SETEX", "mykey", time, value)
Ex.
conn.Do("SETEX", "mykey", 600, value)