class ActionDispatch::Session::CacheStore

def find_session(env, sid)

Get a session from the cache.
def find_session(env, sid)
  unless sid && (session = get_session_with_fallback(sid))
    sid, session = generate_sid, {}
  end
  [sid, session]
end