In my standalone Golang application, I utilize RoseDB and distribute it to the client as an .exe. This application acts as a server that supports multiple sessions for a single account. The keys I use to store session refresh tokens are formatted as session_<user_id>_<device_id>. When a user is deleted from the server, I also need to remove all their sessions. This requires me to map through every existing key and see if it begins with session_<user_id>. I cannot save a refresh token in JSON with session_<user_id> keys because it would cause performance issues, as checking tokens happens with each request, unlike user deletion. Therefore, I really need something similar to the KEYS or SCAN methods in Redis.
In my standalone Golang application, I utilize RoseDB and distribute it to the client as an .exe. This application acts as a server that supports multiple sessions for a single account. The keys I use to store session refresh tokens are formatted as
session_<user_id>_<device_id>
. When a user is deleted from the server, I also need to remove all their sessions. This requires me to map through every existing key and see if it begins withsession_<user_id>
. I cannot save a refresh token in JSON withsession_<user_id>
keys because it would cause performance issues, as checking tokens happens with each request, unlike user deletion. Therefore, I really need something similar to the KEYS or SCAN methods in Redis.