[erlang-questions] State in webmachine
Max Bourinov
bourinov@REDACTED
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.
Best regards,
Max
On Fri, Feb 10, 2012 at 11:48 AM, André Graf <andre@REDACTED> 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
>> correct?
>>
>> How would you do it in easy way?
>>
>> The hard way I know is to spawn process that will keep my data.
>>
>> Best regards,
>> Max
>>
>>
>>
>>
>> ______________________________**_________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>>
>
> ______________________________**_________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120210/7b8f2c0d/attachment.htm>
More information about the erlang-questions
mailing list