Class | Innate::Session |
In: |
lib/innate/session/flash.rb
lib/innate/session.rb |
Parent: | Object |
Mostly ported from Ramaze, but behaves lazy, no session will be created if no session is used.
We keep session data in memory until flush is called, at which point it will be persisted completely into the cache, no question asked.
You may store anything in here that you may also store in the corresponding store, usually it‘s best to keep it to things that are safe to Marshal.
The Session instance is compatible with the specification of rack.session.
Since the Time class is used to create the cookie expiration timestamp, you will have to keep the ttl in a reasonable range. The maximum value that Time can store on a 32bit system is:
Time.at(2147483647) # => Tue Jan 19 12:14:07 +0900 2038
The default expiration time for cookies and the session cache was reduced to a default of 30 days. This was done to be compatible with the maximum ttl of MemCache. You may increase this value if you do not use MemCache to persist your sessions.
cookie_set | [R] | |
flash | [R] | |
request | [R] | |
response | [R] |