25 Nov
2010
25 Nov
'10
1:59 a.m.
On Wed, Nov 24, 2010 at 6:04 PM, Dmitry Olshansky <olshanskydr@gmail.com> wrote:
Hello all,
can I save in Yesod on server-side some information between different requests (State)? I haven't found how to do this.
Yes you can, but not by using a State monad. You basically have two choices: * Store inside the Yesod process, using something like an MVar or TVar. This will work fine, unless you are using multiple Yesod processes to serve requests (odds are, you aren't). * Store state in the database. But if you just want to store a small amount of data about the user, you can use the session, which stores the data encrypted in a cookie. I can give you better advice if I know what the purpose of this is. Michael
5715
Age (days ago)
5715
Last active (days ago)
0 comments
1 participants
participants (1)
-
Michael Snoyman