On 23-04-2014, Michael Merickel wrote:
> --001a11c3f51a5ce90d04f7bc3072
> Content-Type: text/plain; charset=UTF-8
>
> On Wed, Apr 23, 2014 at 3:59 PM, wilk <[email protected]> wrote:
>
>> Could you give an example of a serializer object wich will record the
>> session on a dict in memory for example ?
>>
>
> https://gist.github.com/mmerickel/8035611
>
>  Unfortunately there's one little quirk that you can't reuse the session
> id, so it changes per request, which may be a problem if you're using a
> session in combination with concurrent ajax requests (a problem with any
> blob-based session storage really). This could be fixed by using
> get_current_request() or by modifying the Pyramid api slightly to pass the
> request into the serializer.
>

Thanks, it's what i thought. I try a version to keep the ID. We also 
have the 'accessed' parameter which will help to clean the old sessions.

https://gist.github.com/flibustenet/11248284

Do you think it can be an interest to make public the structure of 
`appstruct` and probably add the `request` to dumps and loads ?

I have an interest of a simple memory session like that for little web 
services, I can try to submit a patch.

> Nice part about this is that the session cookie is securely tracked by
> Pyramid and you're only responsible for cleaning up old sessions in the
> backend.

Yes, it was a good idea.

-- 
William

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to