The Chicago Boss API is mostly stable, but still might change before 1.0.
BossSession is a multiadapter session management. The following adapters are supported (specified in boss.config):
cache
- Store sessions in whatever cache system is configured. Requires cache_enable
to be set to true
mnesia
- Mnesia. Requires the node to have a name.mock
- In-memory sessions which uses ETS.BossSession is automatically started, so, by default an ETS based session support is provided.
The current session ID is available to controllers as the second module parameter. To disable sessions, set "session_enable" to "false" in your boss.config file.
BossFlash is a utility on top of boss_session, you can store messages between requests, automatically populated to the view as {{ boss_flash }}
and deleted from session after used.
Starts new session with the specified Cookie
.
Get session data for the SessionID
.
Get session data for the SessionID
for a given Key
.
Set session data for the SessionID
.
Delete session for given SessionID
.
Remove the Key from session data for the SessionID
.
Add flash messages in the controller like:
Use the boss_flash var in the view, should render "notice - Flash Title - Flash Message":
Retrieve the current flash messages for SessionID
and flush the message stack.
Add a message to the flash message stack for SessionID
.
Add a message to the flash message stack for SessionID
.
Add a message to the flash message stack for SessionID
.