instance method
set_session
Ruby on Rails 4.0.13
Since v3.2.22.5 Last seen in v4.2.9Signature
set_session(env, sid, session, options)
Set a session in the cache.
Parameters
-
envreq -
sidreq -
sessionreq -
optionsreq
Source
# File actionpack/lib/action_dispatch/middleware/session/cache_store.rb, line 26
def set_session(env, sid, session, options)
key = cache_key(sid)
if session
@cache.write(key, session, :expires_in => options[:expire_after])
else
@cache.delete(key)
end
sid
end
Defined in actionpack/lib/action_dispatch/middleware/session/cache_store.rb line 26
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Session::CacheStore