> > There is one thing which I cant get .. could be my weak python ... m > > new 2 it also ... > >https://github.com/webpy/webpy/blob/master/web/session.py#L26 > > if I set the timeout to some value and the browser which created that > > cookie never visit me again still that cookie will be deleted after > > the said amount of time automatically or do I have to specifically > > write code for it. I need to know bcoz I dont want the datastore to > > get filled with useless sessions > > If the session expires, you'll have to create a new one. Depending on > what exactly you do with the session, you need to re-auth the user or > somehow restore the previous state. Don't rely on sessions to be there > forever, though. The usual way is: > > session <-- user_id <--- persistent state > > where session is variable, user_id is constant, and persistent state > points to user_id rather than session_id. By persistent state I mean > stuff like configuration options or whatever users might change and > want restored after authentication. > > --
Thats not what I asked ... u got it all wrong ... let me use the word table rather than datastore model for simplicity in explaining my doubt my question is ... every time I create a session I store atleast 2 things in the session table session.id = randomno and session.user="someuser" The someuser will help me to serve the user any personalized content which I will keep with his userid in a separate table used to store user info ... what u mentioned was related to this My doubt was about will the row in the session table automatically deleted after the expiry period even if the browser never send any request again I hope I have cleared it this time ... Cheers PK -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
