Copy link to clipboard
Copied
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?
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.
^_^
Copy link to clipboard
Copied
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.
^_^