Expires
Set Expire Time
You can set the Expire time in Seconds or Milliseconds with
await redis.expire("my_key", 5) # 5 Seconds
await redis.pexpire("my_key", 1200) # 1200 Milliseconds => 1.2 Seconds
Get Expire Time
You can get the Expire tim of a Key with
await redis.ttl("my_key") # 5
await redis.pttl("my_key") # 1200
await redis.pttl("this_key_dont_exists") # -2
await redis.pttl("expired_key") # -1