RedisJSON / redisjson-py

An extension to redis-py for using Redis' ReJSON module
https://redisjson.io
BSD 2-Clause "Simplified" License
160 stars 34 forks source link

How do I set expiry? #71

Open bansalnaman15 opened 2 years ago

bansalnaman15 commented 2 years ago
obj = {
    "id": 1,
    "uname": "abc"
}

rj.jsonset('key1', Path.rootPath(), obj)
gkorland commented 2 years ago

EXPIRE is the commanf you're looking for see: https://redis.io/commands/expire.

client.expire(...)