instance method
find_session
Ruby on Rails 5.1.7
Since v5.0.7.2Signature
find_session(env, sid)
Get a session from the cache.
Parameters
-
envreq -
sidreq
Source
# File actionpack/lib/action_dispatch/middleware/session/cache_store.rb, line 21
def find_session(env, sid)
unless sid && (session = @cache.read(cache_key(sid)))
sid, session = generate_sid, {}
end
[sid, session]
end
Defined in actionpack/lib/action_dispatch/middleware/session/cache_store.rb line 21
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Session::CacheStore