I’m developing a web application using Compojure and I would hugely appreciate a small and complete example of storing and retrieving session data.
Many thanks in advance,
James.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is an example of using both Ring’s functional style of working with sessions and using an external library (sandbar) to work with the session through a map style interface:
GitHub
If you are only interested in the Ring approach then you could replace wrap-stateful-session with wrap-session in this example and that will work.
As the author of sandbar, I prefer the map approach but both styles have their place.