At 11:40 AM 8/1/2003 -0400, you wrote: >This is a very good idea, but for my purposes (I didn't ask the original >question) I need to know when the session is scheduled to time-out. How do >I get that info for a session? >In other words, when a page request runs a session's last-used-time is >reset to NOW(). But as times goes on the session gets closer to it's >time-out. When the time-out hits some "invisible" activity in the CF >server will expire the session and throw away the session variables. How >do I get the current time-out value or "age" of each session?
You could do what another fellow said - keep an application scope structure going. Perhaps use the CFID:CFTOKEN pair as the key. Set up your app so that on each page, you store a datetime variable in that application strucutre key, set to Now() + your desired session timeout. Say your timeout is 30 min... a user hits it at noon... then the application structure value for his cfid/cftoken key would be 12:30. You could take it a bit farther if you wanted, make the cfid/cftoken key value a structure itself, store the current time + timeout in one var, and maybe keep a running page-hit count in another var. To keep that application structure clean, perhaps set up a scheduled task to run once a min or every few min, to look through the stored datetimes throughout. If any are past, then that should mean that session has timed out and the user is gone - clean that key out. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

