API for noir.session - Noir ()


Usage:
(ns your-namespace
  (:require noir.session))

Overview

Stateful session handling functions. Uses a memory-store by
default, but can use a custom store by supplying a :session-store
option to server/start. All keys are stored as strings.

Public Variables and Functions



clear!

function
Usage: (clear!)
Remove all data from the session and start over cleanly.


flash-get

function
Usage: (flash-get)
Retrieve the flash stored value. This will remove the flash from the
session.


flash-put!

function
Usage: (flash-put! v)
Store a value with a lifetime of one retrieval (on the first flash-get,
it is removed). This is often used for passing small messages to pages
after a redirect.


get

function
Usage: (get k)
       (get k default)
Get the key's value from the session, returns nil if it doesn't exist.


put!

function
Usage: (put! k v)
Associates the key with the given value in the session


remove!

function
Usage: (remove! k)
Remove a key from the session


swap!

function
Usage: (swap! f & args)
Replace the current session's value with the result of executing f with
the current value and args.
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.