How to log out automatically without being active for a long time?

how to log out automatically without being active for too long?

and there are updates in the background. The web application logs out and the user logs in

Mar.19,2021

scheduled task scheme:

if loginExpire <= currentTime - lastActiveTime is true{//
    //do logout operations
}

caching scheme:

redis set(token, user, lastActivetime + loginExpire, timeUnit);//get&set

the front end checks whether the login status expires at regular intervals and automatically exits

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-1b3ced6-2c369.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-1b3ced6-2c369.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?