How can I in an easy way find out when a session expires? On way would be to store in the session "SessionSetDateTime" and then look at the session_data object and do the math. Before I do that I just wanna check if there already is a way to do this stuff. Is there. Like <dtml-var "REQUEST.SESSION.expiresWhen()"> or <dtml-var "REQUEST.SESSION.minutesLeft()"> --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.381 / Virus Database: 214 - Release Date: 2002-08-02
No, you'll need to "roll your own" on this one... Note that sessions aren't strictly guaranteed to expire in the timeout minutes value set on the data container... it's more of a target value. See "Session Data Object Expiration Considerations" in http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Sessions .stx . ----- Original Message ----- From: "Peter Bengtsson" <mail@peterbe.com> To: <zope@zope.org> Sent: Tuesday, August 20, 2002 12:11 PM Subject: [Zope] Session timeout
How can I in an easy way find out when a session expires?
On way would be to store in the session "SessionSetDateTime" and then look at the session_data object and do the math. Before I do that I just wanna check if there already is a way to do this stuff. Is there. Like <dtml-var "REQUEST.SESSION.expiresWhen()"> or <dtml-var "REQUEST.SESSION.minutesLeft()">
-------------------------------------------------------------------- ------------
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.381 / Virus Database: 214 - Release Date: 2002-08-02
Peter Bengtsson writes:
How can I in an easy way find out when a session expires?
On way would be to store in the session "SessionSetDateTime" and then look at the session_data object and do the math. Before I do that I just wanna check if there already is a way to do this stuff. Is there. Like <dtml-var "REQUEST.SESSION.expiresWhen()"> or <dtml-var "REQUEST.SESSION.minutesLeft()"> When I understand it right, then the session timeout it refreshed whenever you are able to access the session this way.
This means, you should get the defined timeout value. Surely, there is a way to ask the session container for this value. Dieter
participants (3)
-
Chris McDonough -
Dieter Maurer -
Peter Bengtsson