after the user logs in, the user id login ip is encrypted by some algorithms.
after encryption, the user token is written to the database and written to the cache (redis)
the purpose of writing the cache is that every time the client requests to get the user id to write to the database, it wants to clear the token after the user has changed the password and so on.
but the write cache is one hour after the redis expires, there is no way to continue to use it after expiration
I have an idea, that is, if you can"t query it in the cache, go to the database to query the database and directly return to write to the cache again
.but this way of implementation doesn"t seem to be very good. Do you gods have any good ideas?