To my understanding, when a session is initialized for some user,
the session gets a hash and session_id which identifies it.
ex. session[key]=value
session_id = 23f8fzsj2048j20j
Now, when logging out a user, I know you can simply set
session[:user_id] = nil
But what happens to the actual session hash?
If I'm not wrong, if there is User A, B, and C, they each get assigned a unique session, for example with User A with session_id = 12345abc, User B with session_id = 23456abc, and so on.
Does this not create infinite amount of session hashes then? Are they garbage collected when they do not get used?