Skip to content
A Riak implementation for Ring Sessions
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This permits you to store your ring session in riak.


In your project.clj [ring-session-riak "0.0.1"]

Wrap your routes:

(-> routes
    (wrap-session {:store (ring.middleware.session.riak/riak-store)}))

The riak-store fn provides a few options to give it:

:host - the host to connect to. String. Defaults to localhost
:port - the port to connect to. Number. Defaults to 8087
:bucket - the bucket to save sessions into. Defaults to "sessions"


In examples/functional you have an example of using pure ring sessions with riak. To switch over to use "normal" memory sessions from ring just remove the {:store (riak-store)} option to the wrap-session middleware.

In examples/stateful you have an example of using the stateful sessions from sandbar. Same routine there to switch over to memory backed stateful sessions, just remove the {:store (riak-store)} option to wrap-stateful-session.


This should support conflict resolution as well as setting the R and W values.

How are sessions expired? In ring? For plugin stores?

Copyright (C) 2011 Parham Michael Ossareh

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.