expire sessions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

expire sessions

Ron Teitelbaum
Hi All,

I have some session objects that need to be cleaned up.  I was hoping that
expire would be sent to inactive sessions.  It looks like this might be
happening randomly during requests but I'm not sure.

I see that unregister: -> clearHandlers -> unregistered calls expire.  I
think while tracing it I saw a 10% random chance of sessions expiring this
way.  

Am I getting this right do sessions expire this way, triggered randomly by
additional requests?  

If so this works when a browser is closed, but could we also add expire to
the second to last line of:

WARegistry >> handleKeyRequest: aRequest
        | key handler keyString |
        "Under some circumstances, HTTP fields are collections of values"
        key := [keyString := aRequest at: self handlerField.
                        (keyString isKindOf: OrderedCollection) ifTrue:
[keyString := keyString first].
                        WAExternalID fromString: keyString] on: Error do:
[:e | nil].
        handler := handlersByKey at: key ifAbsent: [nil].
        ^ (handler notNil and: [handler isActive])
                ifTrue: [handler handleRequest: aRequest]
                ifFalse: [
                        handler expire.  "EXPIRE THE SESSION Since it timed
out"
                        self handleExpiredRequest: aRequest]


This would allow me to clean up sessions that expire sooner when the browser
was left open.  

Thank you for your help!

Ron Teitelbaum


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside