Method: ActionDispatch::Session::CacheStore#find_session

Defined in:
actionpack/lib/action_dispatch/middleware/session/cache_store.rb

#find_session(env, sid) ⇒ Object

Get a session from the cache.



30
31
32
33
34
35
# File 'actionpack/lib/action_dispatch/middleware/session/cache_store.rb', line 30

def find_session(env, sid)
  unless sid && (session = get_session_with_fallback(sid))
    sid, session = generate_sid, {}
  end
  [sid, session]
end