Thanks Greg! I found your code a great reference... just in case you're curious I was doing things similairly in my code - which still is only working in RAM serverside so far, I've yet to plugin memcache as you have. I may just merge with your library to plugin to memcache once I find out what the limits of my simple session logic is going to be...
theSessionCookie = handler.request.cookies.get('theSessionCookie', '') if theSessionCookie == '' or not theSessionCookie in context.sessions: newSessionId = str(handler.request.remote_addr) + '_' + \ str(long(time.time()*1000.0)) + '_' + str(random.random()) handler.response.headers.add_header( 'Set-Cookie', 'theSessionCookie=%s; expires=Fri, 31-Dec-2020 23:59:59 GMT' \ % newSessionId) theSessionCookie = newSessionId context.sessions[theSessionCookie] = HTTPSession() ('context' is a just a simple global) Then I just accessed my HTTPSession with: sessionObject = context.sessions[theSessionCookie] Which is just a thin wrapper around a dict for all the session variables. On Nov 2, 6:10 pm, Greg <[EMAIL PROTECTED]> wrote: > > The system looks great. I was hoping to however store 'plain' python > > objects in RAM on the serverside - the reason for this is to not incur > > any quota 'hits' by hitting the datastore... also I didn't want to > > have to restrict to only pickle-able objects for the session data. > > I have a very small memcache-only session module here: > > http://code.google.com/p/gmemsess/ > > This will not hit the datastore at all, and can contain any data > types, not just the datastore variable types. Of course, it is limited > by memcache, and so may disappear due to memory constraints, but so > far has been completely reliable in sub-hour time frames. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---