instance method
find_session
Ruby on Rails 8.0.5.2
Since v5.0.7.2Signature
find_session(req, sid)
Get a session from the cache.
Parameters
-
reqreq -
sidreq
Source
# File actionpack/lib/action_dispatch/middleware/session/cache_store.rb, line 32
def find_session(req, sid)
if sid && (session = get_session_with_fallback(sid))
req.set_header(LOADED_SESSION_ID, sid.private_id)
else
sid, session = generate_sid, {}
end
[sid, session]
end
Defined in actionpack/lib/action_dispatch/middleware/session/cache_store.rb line 32
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Session::CacheStore