I want to store user sessions in KV, but am not sure how to approach it. I need each session entry

I want to store user sessions in KV, but am not sure how to approach it.

I need each session entry to have a unique UUID, but also have the user's ID as part of the key so that I can list a user's sessions.

doing UID:SID as the key lets me use prefix to list a user's sessions, but I cant query a session by just having the session ID (without the user id)

just doing SID as the key lets me query sessions with just a session ID, but I dont know how to list a user's sessions.
Was this page helpful?