How does the hmset in redis set the timeout for a key?

I recorded the token, timeout when I logged in, as shown in the following figure:

clipboard.png

is there any way to set the expiration time for one of these key,? Or delete the data automatically when it expires? If you can"t set the expiration time, do you just have to run a fixed-time task? Please give me some advice if you know. Thank you

Apr.05,2021

EXPIRE key seconds

you can set expiration to any redis data type


redis can only set expiration time for the most advanced key. Unable to set expiration time for individual key in Hashley. If it's just a log log token. You can just use setex (key=token:uid)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb084f-22df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb084f-22df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?