Aurélien DEHAY a écrit :

My choice was to put a "confirmation" field in the database, and put this field (randomly generated) instead of the continuation in the mail. Thus, the user can validate is account whenever he wants. And I've got no continuation left in memory.

In my case i don't use a database (i was very new to cocoon when i started the project and never came in the situation where i really needed one). And the numbers of user wanting to buy a cruise on this boat shouldn't exceed 1 or 2 per day in the best case, so i'm not too scared about the memory usage.


the other situation is when a company want to open an account, the mail is then sent to the manager and the form is redisplayed, allowing the manager to validate/change the data in the form before saving the account.

In the first case, the lifetime of the continuation is set to 10 hours, which should be enough for the user to check is mail and click on the link. If it's not, a page explaining that he have to process his request again is displayed. In the second case, the lifetime is set to 100 hours, so that the manager have a few days to check the validity of the information sent.


Waw. You should have a lot of memory ;) Or very few users :p

Same here with even less demands, maybe one every month or so.


In any case, this approach is really convenient, and i don't really see the danger in doing this.
Could you explain further why it's dangerous/bad practice ?


I don't really know. We were thinking it was a good practice to not over-use the memory by keeping needless things while we could put these in the database, in a same place who can resist to a crash of the machine.

I choose this solution because the good part of the continuation is that you don't have to store anything, the continuation does it for you. And in my case, there is very few continuations likely to live together in memory, and the amount of data stored in memory is very small (only one small dom object and a few strings).

Marc

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to