[erlang-questions] State in webmachine
Fri Feb 10 09:58:04 CET 2012
Thank you Andre!
I also came to this during my investigations... Good that it is easy to
make a process in erlang :-) ETS will also work.
On Fri, Feb 10, 2012 at 11:48 AM, André Graf <> wrote:
> As far as I understand in webmachine the state (they call it context) is
> only passed among the different webmachine resource functions e.g. you
> build up your state in the init/1 function, which you can later use in e.g.
> process_post. Once the request is handled the state is destroyed, as it
> makes sense for a stateless protocol such as http. If you really need
> shared state I would suggest to use a process holding your state or just
> take an ets table.
> Am 10.02.12 08:30, schrieb Max Bourinov:
>> I would like to keep time of last call inside page module. I suspect
>> that State which exists in the page module can help me with it - is it
>> How would you do it in easy way?
>> The hard way I know is to spawn process that will keep my data.
>> Best regards,
>> erlang-questions mailing list
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions