title: How do sessions work in Ruby on Rails?
body: <p>I want to know how sessions work in Ruby on Rails. </p>
  
  <p>I already now that I can save a session with <code>session[:user_id] = @user.id</code> and retrieve it with <code>session[:user_id]</code>.</p>
  
  <p>Thus, does Rails save the session to cookie store, cache store, or database store?</p>