Reputation: 14258
I've defined an app and wish to be able to print out all the values contained in session
store is there a good way to do this?
(def app
(-> #'handler
(ring.middleware.stacktrace/wrap-stacktrace)
(ring.middleware.session/wrap-session)))
Upvotes: 2
Views: 917
Reputation: 8593
You can specify the session store for wrap-session to use:
(def all-the-sessions (atom {}))
(def app
(-> #'handler
(ring.middleware.stacktrace/wrap-stacktrace)
(ring.middleware.session/wrap-session {:store (ring.middleware.session.memory/memory-store all-the-sessions)))
Now you can inspect the all-the-sessions atom.
Upvotes: 6