Skip to main content
May 14, 2013
Answered

sessiontimeout problem

  • May 14, 2013
  • 1 reply
  • 516 views

Trying to make a variable go away after a certain amount of time.

This is in application.cfm

<cfapplication name="testtag" sessionmanagement="yes" sessiontimeout="#createtimespan(0,0,0,10)#">

<cfparam name="session.test" default="a">

This is in another template

<cfif structkeyexists(session,'test')>

there

<cfelse>

gone

</cfif>

Session.test lasts and lasts and want it to go away to make a timer but session.test is staying, getting reset, or something.

What am I doing wrong?

This topic has been closed for replies.
Correct answer WolfShade

It will always exist because application.cfm/cfc is run with every page load - you are paraming the session, so it will run, every time, creating the session variable if it doesn't exist.

^_^

1 reply

WolfShade
WolfShadeCorrect answer
Legend
May 15, 2013

It will always exist because application.cfm/cfc is run with every page load - you are paraming the session, so it will run, every time, creating the session variable if it doesn't exist.

^_^