Closed
Description
using this redis version ("github.com/redis/go-redis/v9")
hashKey := "exampleHash"
field1 := "field1"
value1 := "value1"
expiration := 40 * time.Second
// Set a field in the hash
err = rdb.HSet(ctx, hashKey, field1, value1).Err()
if err != nil {
return
}
// Set expiration for the hash field
err = rdb.HExpire(ctx, hashKey, expiration, field1).Err()
if err != nil {
return
}
HEXPIRE command is not working as it giving this error
ERR unknown command HEXPIRE
, with args beginning with: exampleHash
, 40
, FIELDS
, 1
, field1
,
Can anyone help in this.
Metadata
Metadata
Assignees
Labels
No labels